Skip to content

Commit 5489d8d

Browse files
authored
Fix icon flicker (#157)
* fix image state change #146 * desc the order of icon list and lint code * lint code * use toReversed * restore wrong places fallback option
1 parent 38c1491 commit 5489d8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/extension.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@
4949
5050
if (icons) {
5151
// Get a large icon closest to the desired size
52-
for (const icon of icons.reverse()) {
52+
for (const icon of icons.toReversed()) {
5353
if (icon.size >= size) {
5454
return icon.url;
5555
}
5656
}
5757
}
58-
5958
// Fallback icon
6059
return 'icons/puzzle.svg';
6160
}

0 commit comments

Comments
 (0)