We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb14137 commit 3d1c633Copy full SHA for 3d1c633
test/webdriverio/test/test_setup.ts
@@ -180,9 +180,11 @@ export async function setCurrentCursorNodeById(
180
return await browser.execute((blockId) => {
181
const workspaceSvg = Blockly.getMainWorkspace() as Blockly.WorkspaceSvg;
182
const rootBlock = workspaceSvg.getBlockById(blockId);
183
- workspaceSvg
184
- .getCursor()
185
- ?.setCurNode(Blockly.ASTNode.createBlockNode(rootBlock!)!);
+ if (rootBlock) {
+ workspaceSvg
+ .getCursor()
186
+ ?.setCurNode(Blockly.ASTNode.createBlockNode(rootBlock));
187
+ }
188
}, blockId);
189
}
190
0 commit comments