chore(dashboard): Ignore empty json value for overwrite confirm (#22214)

This commit is contained in:
JUST.in DO IT
2022-11-26 03:44:27 -08:00
committed by GitHub
parent a8bc53d805
commit cc2334e58c

View File

@@ -33,8 +33,10 @@ export default function getOverwriteItems(prev: JsonObject, next: JsonObject) {
keyPath,
...(keyPath.split('.').find(key => JSON_KEYS.has(key))
? {
oldValue: JSON.stringify(extractValue(prev, keyPath), null, 2) || '',
newValue: JSON.stringify(extractValue(next, keyPath), null, 2) || '',
oldValue:
JSON.stringify(extractValue(prev, keyPath), null, 2) || '{}',
newValue:
JSON.stringify(extractValue(next, keyPath), null, 2) || '{}',
}
: {
oldValue: extractValue(prev, keyPath) || '',