Skip to content

Commit

Permalink
fix image loading once again
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 committed Jul 18, 2024
1 parent 1a92316 commit bef2a7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/loadImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const loadImage = function (url: string): Promise<HTMLImageElement> {
return new Promise((resolve, reject) => {
const image = new Image()
image.onerror = reject
image.src = new URL(url, import.meta.url + import.meta.env.BASE_URL).href
image.src = new URL(url, window.location.origin + import.meta.env.BASE_URL).href
resolve(image)
})
}

0 comments on commit bef2a7d

Please sign in to comment.