Skip to content
This repository was archived by the owner on Aug 1, 2022. It is now read-only.

Commit 3c0aa84

Browse files
authored
Fix image not shown due to cache (#59)
1 parent de4ec18 commit 3c0aa84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ export default class extends PureComponent {
166166

167167
// Load the image
168168
this.image = new Image();
169-
this.image.src = this.props.imgSrc;
170169

171170
// Draw the image once loaded
172171
this.image.onload = () =>
173172
drawImage({ ctx: this.ctx.grid, img: this.image });
173+
this.image.src = this.props.imgSrc;
174174
};
175175

176176
undo = () => {

0 commit comments

Comments
 (0)