fix(editor): fix mapping bug when val is null (#3942)

This commit is contained in:
Mutasem Aldmour
2022-08-25 12:54:46 +02:00
committed by GitHub
parent dc576939aa
commit a21dbdc45b
2 changed files with 8 additions and 4 deletions

View File

@@ -45,6 +45,10 @@ export default Vue.extend({
},
methods: {
isSimple(data: unkown): boolean {
if (data === null || data === undefined) {
return true;
}
if (typeof data === 'object' && Object.keys(data).length === 0) {
return true;
}