Skip to content

Commit 3d1c633

Browse files
committed
Fixed lint warning.
1 parent bb14137 commit 3d1c633

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/webdriverio/test/test_setup.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,11 @@ export async function setCurrentCursorNodeById(
180180
return await browser.execute((blockId) => {
181181
const workspaceSvg = Blockly.getMainWorkspace() as Blockly.WorkspaceSvg;
182182
const rootBlock = workspaceSvg.getBlockById(blockId);
183-
workspaceSvg
184-
.getCursor()
185-
?.setCurNode(Blockly.ASTNode.createBlockNode(rootBlock!)!);
183+
if (rootBlock) {
184+
workspaceSvg
185+
.getCursor()
186+
?.setCurNode(Blockly.ASTNode.createBlockNode(rootBlock));
187+
}
186188
}, blockId);
187189
}
188190

0 commit comments

Comments
 (0)