diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 7fdb54bc4..cff18f2de 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -270,10 +270,8 @@ function getChanges() { function isEmpty(obj) { if (obj == null) return true; - if (obj === undefined) return true; - if (Object.keys(obj).length === 0) return true; - - if (obj.length > 0) return false; + if (Array.isArray(obj)) return !obj.length; + return Object.keys(obj).length === 0 ; } async function reload(params) {