Skip to content

Commit be44bc6

Browse files
author
Ives van Hoorne
committed
Fix 'Oh snap' behaviour
1 parent 2619708 commit be44bc6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/app/src/sandbox/compile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,10 @@ async function compile({
347347
// We set it as a time value for people that run two sandboxes on one computer
348348
// they execute at the same time and we don't want them to conflict, so we check
349349
// if the message was set a second ago
350-
if (Date.now() < localStorage.getItem('running') > 1000) {
350+
if (
351+
localStorage.getItem('running') &&
352+
Date.now() - localStorage.getItem('running') > 1000
353+
) {
351354
localStorage.removeItem('running');
352355
showRunOnClick();
353356
return;

0 commit comments

Comments
 (0)