From 4a93d1829a9dc5f08418753dab52b02168c37ecc Mon Sep 17 00:00:00 2001 From: ClemDee Date: Tue, 30 Jul 2019 16:37:35 +0200 Subject: [PATCH] Fix isFolderEmpty function in userObject --- www/common/userObject.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/userObject.js b/www/common/userObject.js index be770232b..eed9fc19c 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -109,7 +109,9 @@ define([ }; exp.isFolderEmpty = function (element) { if (!isFolder(element)) { return false; } - return Object.keys(element).length === 0; + if (Object.keys(element).length === 0) { return true; } + if (Object.keys(element).length === 1 && isFolderData(element[Object.keys(element)[0]])) { return true; } + return false; }; exp.hasSubfolder = function (element, trashRoot) {