fix: settings not getting synced after a change

This commit is contained in:
thecodrr
2021-10-29 13:02:33 +05:00
parent 0bf1a89d1f
commit bac15941b0
4 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
function areAllEmpty(obj) {
const arrays = Object.values(obj).filter((v) => v && v.length !== undefined);
return arrays.every((array) => array.length === 0);
for (let key in obj) {
const value = obj[key];
if (Array.isArray(value) && value.length > 0) return false;
}
return true;
}
export { areAllEmpty };