Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-12-08 16:44:45 +0300
committerGitHub <noreply@github.com>2020-12-08 16:44:45 +0300
commit4de48da971eba817053f0994c1fffab511bb4473 (patch)
tree69fd10d64e19f01e407cf443f75f7252f260a136 /src/utils/fileUtils.js
parent060c54e4ac33a705837e7a282786362cd66fadc1 (diff)
parentc2624fbb1aefca117bab3547f136bd24cc54a132 (diff)
Merge pull request #584 from nextcloud/backport/581/stable19v19.0.6
[stable19] Make sure we have a string to localecompare to
Diffstat (limited to 'src/utils/fileUtils.js')
-rw-r--r--src/utils/fileUtils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/fileUtils.js b/src/utils/fileUtils.js
index 50e6168d..e8a931c0 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())
- : -fileInfo1[key].localeCompare(fileInfo2[key], OC.getLanguage())
+ ? fileInfo1[key]?.localeCompare(fileInfo2[key], OC.getLanguage()) || 1
+ : -fileInfo1[key]?.localeCompare(fileInfo2[key], OC.getLanguage()) || -1
}
const genFileInfo = function(obj) {