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 42b3afc commit 7c76a66
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 @@ -199,11 +199,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 7c76a66

Please sign in to comment.