Skip to content

Commit

Permalink
🐛 Fix asset browser death when two fonts are in a folder
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoMyzrailGorynych committed Jan 3, 2024
1 parent d06d694 commit 4282a13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/riotTags/shared/asset-browser.tag
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ asset-browser.flexfix(class="{opts.namespace} {opts.class} {compact: opts.compac
} else {
this.entries.sort((a, b) =>
this.sortFolderwise(a, b) ||
a.name.localeCompare(b.name) ||
(a.name ?? a.typefaceName).localeCompare(b.name ?? b.typefaceName) ||
this.sortTypewise(a, b));
}
} else if (this.sort === 'type') {
Expand All @@ -372,7 +372,7 @@ asset-browser.flexfix(class="{opts.namespace} {opts.class} {compact: opts.compac
this.entries.sort((a, b) =>
this.sortFolderwise(a, b) ||
this.sortTypewise(a, b) ||
a.name.localeCompare(b.name));
(a.name ?? a.typefaceName).localeCompare(b.name ?? b.typefaceName));
}
} else {
this.entries.sort((a, b) =>
Expand Down
2 changes: 1 addition & 1 deletion src/riotTags/shared/asset-folder-tree.tag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Asset dropping logic is left in asset-browser for DRY purposes,
but folder dropping is implemented here.

TODO: support folder dropping from asset-browser.
TODO: support folder dropping from asset-browser.

@attribute path (IAssetFolder[])
Currently opened folders, from the root to the current directory.
Expand Down

0 comments on commit 4282a13

Please sign in to comment.