feat: refs #7050 7050 add object check
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
JOSE ANTONIO TUBAU RODRIGUEZ 2024-12-12 15:53:56 +01:00
parent c164c39a2d
commit 77f4949ba6
1 changed files with 2 additions and 4 deletions

View File

@ -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) {