fix a few things, add comments for others
This commit is contained in:
@@ -109,7 +109,9 @@ define([
|
||||
};
|
||||
exp.isFolderEmpty = function (element) {
|
||||
if (!isFolder(element)) { return false; }
|
||||
// if the folder contains nothing, it's empty
|
||||
if (Object.keys(element).length === 0) { return true; }
|
||||
// or if it contains one thing and that thing is metadata
|
||||
if (Object.keys(element).length === 1 && isFolderData(element[Object.keys(element)[0]])) { return true; }
|
||||
return false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user