fix(editor): Fix node runData and pinned data check on manual run (#8669)

This commit is contained in:
Csaba Tuncsik
2024-02-19 13:02:20 +01:00
committed by GitHub
parent e1a4fde207
commit 40c7f77a35
4 changed files with 378 additions and 10 deletions

View File

@@ -23,11 +23,10 @@ export function isJsonKeyObject(item: unknown): item is {
export const isEmpty = (value?: unknown): boolean => {
if (!value && value !== 0) return true;
if (Array.isArray(value)) {
if (!value.length) return true;
return value.every(isEmpty);
return !value.length || value.every(isEmpty);
}
if (typeof value === 'object') {
return Object.values(value).every(isEmpty);
return !Object.keys(value).length || Object.values(value).every(isEmpty);
}
return false;
};