Commit b4f1857e authored by Alex Beregszaszi's avatar Alex Beregszaszi

Workaround some browsers and delete loaded compiler properly

parent b55d3f05
...@@ -9,6 +9,9 @@ module.exports = function (self) { ...@@ -9,6 +9,9 @@ module.exports = function (self) {
switch (data.cmd) { switch (data.cmd) {
case 'loadVersion': case 'loadVersion':
delete self.Module; delete self.Module;
// NOTE: workaround some browsers?
self.Module = undefined;
compileJSON = null; compileJSON = null;
self.importScripts(data.data); self.importScripts(data.data);
......
...@@ -144,6 +144,9 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) { ...@@ -144,6 +144,9 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
function loadInternal (url) { function loadInternal (url) {
delete window.Module; delete window.Module;
// NOTE: workaround some browsers?
window.Module = undefined;
// Set a safe fallback until the new one is loaded // Set a safe fallback until the new one is loaded
setCompileJSON(function (source, optimize) { setCompileJSON(function (source, optimize) {
compilationFinished({error: 'Compiler not yet loaded.'}); compilationFinished({error: 'Compiler not yet loaded.'});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment