Skip to content

Commit 2cba2e3

Browse files
committed
fix worker wrapper
1 parent 7cb6ee9 commit 2cba2e3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

webgl/resources/lessons-helper.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
// eslint-disable-line
6666
}
6767
try {
68-
document.body.className = 'iframe';
68+
if (document.body) {
69+
document.body.className = 'iframe';
70+
}
6971
} catch (e) {
7072
// eslint-disable-line
7173
}
@@ -334,7 +336,7 @@
334336
super(url);
335337
let listener;
336338
this.onmessage = function(e) {
337-
if (!e || !e.data || !e.data.type === '___editor___') {
339+
if (!e || !e.data || e.data.type !== '___editor___') {
338340
if (listener) {
339341
listener(e);
340342
}

0 commit comments

Comments
 (0)