Skip to content

Commit

Permalink
fixes requestIdleCallback error in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanBreck committed Dec 1, 2023
1 parent def23c6 commit bb8d176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/icon/icon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// 404).
if (isSSR) return
requestIdleCallback(() => {
window.requestIdleCallback?.(() => {
const image = new Image()
image.src = getIconUrl(lastIconBasePath, name)
image.onerror = () => delete svgCache[image.src]
Expand Down

0 comments on commit bb8d176

Please sign in to comment.