Skip to content

Commit

Permalink
Fix icon flicker (#157)
Browse files Browse the repository at this point in the history
* fix image state change #146

* desc the order of icon list and lint code

* lint code

* use toReversed

* restore wrong places fallback option
  • Loading branch information
hankxdev authored Sep 27, 2024
1 parent 38c1491 commit 5489d8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/extension.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@
if (icons) {
// Get a large icon closest to the desired size
for (const icon of icons.reverse()) {
for (const icon of icons.toReversed()) {
if (icon.size >= size) {
return icon.url;
}
}
}
// Fallback icon
return 'icons/puzzle.svg';
}
Expand Down

0 comments on commit 5489d8d

Please sign in to comment.