From 671a90c06d67bd02cbfd1c0f84e8e706d1a387b9 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 3 Jun 2016 20:37:09 +0100 Subject: [PATCH] Remove obsolete external function setCompileJSON --- src/app/compiler.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/compiler.js b/src/app/compiler.js index 048a4f93e4..c34be42d88 100644 --- a/src/app/compiler.js +++ b/src/app/compiler.js @@ -63,11 +63,6 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles editor.setAnnotations(sourceAnnotations); }; - function setCompileJSON () { - compileJSON = function(source, optimize) { compilationFinished('{}'); }; - }; - this.setCompileJSON = setCompileJSON; - function onCompilerLoaded (setVersionText) { if (worker === null) { var compile; @@ -139,7 +134,9 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles this.loadVersion = function (version, setVersionText) { Module = null; - setCompileJSON(); + // Set a safe fallback until the new one is loaded + compileJSON = function(source, optimize) { compilationFinished('{}'); }; + var newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = url;