Skip to content

Commit 563b3b6

Browse files
yeion7SaraVieira
authored andcommitted
cancel action on close modal (codesandbox#2504)
* cancel action on close modal * fix type check
1 parent 771afd3 commit 563b3b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/app/src/app/overmind/factories.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,12 @@ export const withOwnedSandbox = <T>(
8686
});
8787
} else if (modalResponse === 'unfreeze') {
8888
state.editor.sessionFrozen = false;
89+
} else if (modalResponse === 'cancel') {
90+
return;
8991
}
9092
}
9193

94+
// eslint-disable-next-line consistent-return
9295
return continueAction(context, payload);
9396
};
9497

0 commit comments

Comments
 (0)