diff --git a/src/block_manager/index.js b/src/block_manager/index.js index 75f2a819b..e5877e883 100644 --- a/src/block_manager/index.js +++ b/src/block_manager/index.js @@ -262,7 +262,7 @@ export default () => { blocks.stopListening(); blocksVisible.reset(); categories.reset(); - blocksView.remove(); + blocksView && blocksView.remove(); [blocks, blocksVisible, categories, blocksView].forEach(i => (i = null)); c = {}; } diff --git a/test/specs/editor/index.js b/test/specs/editor/index.js index 0efcfbd59..1eb70a084 100644 --- a/test/specs/editor/index.js +++ b/test/specs/editor/index.js @@ -3,10 +3,11 @@ import Editor from 'editor'; const { keys } = Object; const initComps = 1; -describe('Editor', () => { - const editor = new Editor(); +describe.only('Editor', () => { + let editor; beforeEach(() => { + editor = new Editor(); editor.init(); });