Skip to content

Commit aef9ed1

Browse files
committed
Fix bug of ContextMenu on adding new state fixed
Now if adding new state fails, ContextMenu closes
1 parent bc0f9b2 commit aef9ed1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/app.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,10 @@ cnv.oncontextmenu = function (e) {
451451
const { x, y } = contextMenuPos;
452452
const name = prompt('whats name of state you wanna create ?');
453453

454-
if (name === null || !name.trim()) return;
454+
if (name === null || !name.trim()){
455+
contextMenu();
456+
return;
457+
}
455458

456459
try {
457460
fa.addState({

0 commit comments

Comments
 (0)