Skip to content

Commit

Permalink
chore(dashboard): Ignore empty json value for overwrite confirm (#22214)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Nov 26, 2022
1 parent a8bc53d commit cc2334e
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 cc2334e

Please sign in to comment.