Skip to content

Commit 397db77

Browse files
fix: Use blockly.dialog.alert for alert (#318)
1 parent 545dfe5 commit 397db77

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/actions/enter.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import {ASTNode, ShortcutRegistry, utils as BlocklyUtils} from 'blockly/core';
7+
import {
8+
ASTNode,
9+
ShortcutRegistry,
10+
utils as BlocklyUtils,
11+
dialog,
12+
} from 'blockly/core';
813

914
import type {
1015
Block,
@@ -101,7 +106,7 @@ export class EnterAction {
101106
curNode.in()?.getSourceBlock() === block
102107
? canMoveInHint
103108
: genericHint;
104-
alert(hint);
109+
dialog.alert(hint);
105110
}
106111
} else if (curNode.isConnection() || nodeType === ASTNode.types.WORKSPACE) {
107112
this.navigation.openToolboxOrFlyout(workspace);

0 commit comments

Comments
 (0)