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

This commit is contained in:
JimmFly
2023-02-16 13:38:33 +08:00
committed by GitHub
parent e2b17bc310
commit 520076b31d

View File

@@ -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 => {