Skip to content

Commit

Permalink
Fix timing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Jul 2, 2018
1 parent 8377b53 commit 1ed3808
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ export default class App extends Component<Props, State> {
return;
}

const bmp = await createImageBitmap(result);

images = this.state.images.slice() as [EncodedImage, EncodedImage];

images[index] = {
...images[index],
bmp: await createImageBitmap(result),
bmp,
size: result.size,
loading: image.loadingCounter !== loadingCounter,
loadedCounter: loadingCounter,
Expand Down

0 comments on commit 1ed3808

Please sign in to comment.