mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-15 21:40:06 +02:00
unbind onCreate once executed
This commit is contained in:
@@ -453,7 +453,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
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<AppProps, AppState> {
|
||||
...this.scene.getElementsIncludingDeleted(),
|
||||
customElement,
|
||||
]);
|
||||
unbind();
|
||||
};
|
||||
|
||||
private renderCanvas() {
|
||||
|
Reference in New Issue
Block a user