diff --git a/src/components/App.tsx b/src/components/App.tsx index 9003f8ff3..c329648ca 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -453,7 +453,7 @@ class App extends React.Component { height, }); - this.scene.addCallback(() => { + const unbind = this.scene.addCallback(() => { const customElementConfig = getCustomElementConfig( this.props.customElementsConfig, customElement.customType, @@ -466,6 +466,7 @@ class App extends React.Component { ...this.scene.getElementsIncludingDeleted(), customElement, ]); + unbind(); }; private renderCanvas() {