diff --git a/src/utils/fileUtils.js b/src/utils/fileUtils.js index e8a931c0e..2938366c5 100644 --- a/src/utils/fileUtils.js +++ b/src/utils/fileUtils.js @@ -93,8 +93,8 @@ const sortCompare = function(fileInfo1, fileInfo2, key, asc = true) { // finally sort by name return asc - ? fileInfo1[key]?.localeCompare(fileInfo2[key], OC.getLanguage()) || 1 - : -fileInfo1[key]?.localeCompare(fileInfo2[key], OC.getLanguage()) || -1 + ? fileInfo1[key]?.toString()?.localeCompare(fileInfo2[key].toString(), OC.getLanguage()) || 1 + : -fileInfo1[key]?.toString()?.localeCompare(fileInfo2[key].toString(), OC.getLanguage()) || -1 } const genFileInfo = function(obj) {