omits undefined values from listConfig

This commit is contained in:
nai-degen 2023-04-15 00:44:52 -07:00
parent 5c885eaa1a
commit e4495798ee
1 changed files with 5 additions and 0 deletions

View File

@ -72,6 +72,11 @@ export function listConfig(): Record<string, string> {
const result: Record<string, string> = {}; const result: Record<string, string> = {};
for (const key of getKeys(config)) { for (const key of getKeys(config)) {
const value = config[key]?.toString() || ""; const value = config[key]?.toString() || "";
if (value === "" || value === "undefined") {
continue;
}
if (value && SENSITIVE_KEYS.includes(key)) { if (value && SENSITIVE_KEYS.includes(key)) {
result[key] = "********"; result[key] = "********";
} else { } else {