diff --git a/src/react/components/pages/editorPage/canvas.tsx b/src/react/components/pages/editorPage/canvas.tsx index 7dba8ae3..79a51b93 100644 --- a/src/react/components/pages/editorPage/canvas.tsx +++ b/src/react/components/pages/editorPage/canvas.tsx @@ -191,6 +191,9 @@ export default class Canvas extends React.Component this.selectedRegionIds = []; this.imageMap.removeAllFeatures(); this.imageMap.resetAllLayerVisibility(); + if (this.state.pdfFile) { + await this.state.pdfFile.destroy(); + } this.setState({ currentAsset: this.props.selectedAsset,