Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/editorjs",
"version": "2.31.0",
"version": "2.31.1",
"description": "Editor.js — open source block-style WYSIWYG editor with JSON output",
"main": "dist/editorjs.umd.js",
"module": "dist/editorjs.mjs",
Expand Down
8 changes: 7 additions & 1 deletion src/components/modules/toolbar/blockSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
public destroy(): void {
this.removeAllNodes();
this.listeners.destroy();
this.eventsDispatcher.off(EditorMobileLayoutToggled, this.close);

/**
* Do not unsubscribe the callback if it was never subscribed
*/
if (this.nodes.wrapper) {
this.eventsDispatcher.off(EditorMobileLayoutToggled, this.close);
}
}

/**
Expand Down
Loading