Skip to content

Commit

Permalink
chore(dashboard): Ignore empty json value for overwrite confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Nov 24, 2022
1 parent 888f43c commit 265564c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions superset-frontend/src/dashboard/util/getOverwriteItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) || '',
Expand Down

0 comments on commit 265564c

Please sign in to comment.