We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1868c52 commit f2b3ba4Copy full SHA for f2b3ba4
src/ui/views/native/Tree.vue
@@ -388,8 +388,12 @@ export default {
388
}
389
if (this.sortBy !== 'index') {
390
return sortBy(items, [(item) => {
391
- if (this.sortBy === 'url' && item.url) {
392
- return new URL(item[this.sortBy]).hostname
+ if (this.sortBy === 'url') {
+ if (item.url) {
393
+ return new URL(item.url).hostname
394
+ } else {
395
+ return '0' // folders to the top
396
+ }
397
398
return item[this.sortBy].toLowerCase()
399
}])
0 commit comments