feat: refs #7050 7050 add object check
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
c164c39a2d
commit
77f4949ba6
|
@ -270,10 +270,8 @@ function getChanges() {
|
||||||
|
|
||||||
function isEmpty(obj) {
|
function isEmpty(obj) {
|
||||||
if (obj == null) return true;
|
if (obj == null) return true;
|
||||||
if (obj === undefined) return true;
|
if (Array.isArray(obj)) return !obj.length;
|
||||||
if (Object.keys(obj).length === 0) return true;
|
return Object.keys(obj).length === 0 ;
|
||||||
|
|
||||||
if (obj.length > 0) return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function reload(params) {
|
async function reload(params) {
|
||||||
|
|
Loading…
Reference in New Issue