Skip to content

Commit bcef91b

Browse files
committed
[simulator/web] Better window definition check
1 parent ff068ca commit bcef91b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/port/port.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void python_execution_end() {
6868

6969
// window isn't defined on Node (CI)
7070
EM_ASM({
71-
if (window) {
71+
if (typeof variable !== 'undefined') {
7272
window.postMessage({
7373
type: 'epsilon_micropython_executionEnvironment_runCode_finished',
7474
value: Module.___temp_storage_dump,

0 commit comments

Comments
 (0)