Workaround some browsers and delete loaded compiler properly

pull/1/head
Alex Beregszaszi 8 years ago
parent b55d3f054e
commit b4f1857e08
  1. 3
      src/app/compiler-worker.js
  2. 3
      src/app/compiler.js

@ -9,6 +9,9 @@ module.exports = function (self) {
switch (data.cmd) {
case 'loadVersion':
delete self.Module;
// NOTE: workaround some browsers?
self.Module = undefined;
compileJSON = null;
self.importScripts(data.data);

@ -144,6 +144,9 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
function loadInternal (url) {
delete window.Module;
// NOTE: workaround some browsers?
window.Module = undefined;
// Set a safe fallback until the new one is loaded
setCompileJSON(function (source, optimize) {
compilationFinished({error: 'Compiler not yet loaded.'});

Loading…
Cancel
Save