fix: assert error when toolWrapper is null (#1048)

This commit is contained in:
JimmFly authored and GitHub committed 2023-02-15 23:38:33 -06:00
1 parent e2b17bc310
commit 520076b31d
1 file changed
+3 -1
@@ -32,7 +32,9 @@ const BlockHubAppender = () => {
abortController.signal.addEventListener('abort', () => {
blockHubElement?.remove();
const toolWrapper = document.querySelector('#toolWrapper');
assertEquals(toolWrapper?.childNodes.length, 0);
if (toolWrapper) {
assertEquals(toolWrapper.childNodes.length, 0);
}
});
editor?.createBlockHub().then(blockHub => {