Skip to content

Commit 327b0e1

Browse files
committed
Fix type issue
1 parent 81dd93b commit 327b0e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/app/src/app/overmind/namespaces/editor/internalActions.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,9 @@ export const forkSandbox: AsyncAction<{
354354
{ sandboxId: id, body, openInNewWindow = false }
355355
) => {
356356
const sandbox = state.editor.currentSandbox;
357+
const currentSandboxId = state.editor.currentId;
357358

358-
if (!sandbox) {
359+
if (!sandbox || !currentSandboxId) {
359360
return;
360361
}
361362

@@ -370,8 +371,6 @@ export const forkSandbox: AsyncAction<{
370371
return;
371372
}
372373

373-
const currentSandboxId = state.editor.currentId;
374-
375374
effects.analytics.track('Fork Sandbox');
376375

377376
try {

0 commit comments

Comments
 (0)