@ -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;
window.Module = undefined;
// Set a safe fallback until the new one is loaded
setCompileJSON(function (source, optimize) {
compilationFinished({error: 'Compiler not yet loaded.'});