Skip to content

Commit

Permalink
fix: delete pdf worker after switching assets (microsoft#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
stew-ro authored Nov 16, 2020
1 parent f299097 commit e19d372
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/react/components/pages/editorPage/canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ export default class Canvas extends React.Component<ICanvasProps, ICanvasState>
this.selectedRegionIds = [];
this.imageMap.removeAllFeatures();
this.imageMap.resetAllLayerVisibility();
if (this.state.pdfFile) {
await this.state.pdfFile.destroy();
}

this.setState({
currentAsset: this.props.selectedAsset,
Expand Down

0 comments on commit e19d372

Please sign in to comment.