Skip to content

Commit

Permalink
fix: add to image cache when it loaded #1325
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver committed Jun 14, 2023
1 parent 1bd523b commit 5d8ab0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/g-plugin-image-loader/src/ImagePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ export class ImagePool {

if (image) {
image.onload = () => {
this.imageCache[src] = image;
resolve(image);
};
image.onerror = (ev) => {
reject(ev);
};
image.crossOrigin = 'Anonymous';
image.src = src;
this.imageCache[src] = image;
}
});
}
Expand Down

0 comments on commit 5d8ab0a

Please sign in to comment.