Commit 8f800709 authored by Jason Stafford's avatar Jason Stafford

fix linter errors (whitespace changes)

parent 38b2fdef
...@@ -80,12 +80,8 @@ var languagePluginLoader = new Promise((resolve, reject) => { ...@@ -80,12 +80,8 @@ var languagePluginLoader = new Promise((resolve, reject) => {
if (self.document) { // browser if (self.document) { // browser
const script = self.document.createElement('script'); const script = self.document.createElement('script');
script.src = url; script.src = url;
script.onload = (e) => { script.onload = (e) => { onload(); };
onload(); script.onerror = (e) => { onerror(); };
};
script.onerror = (e) => {
onerror();
};
self.document.body.appendChild(script); self.document.body.appendChild(script);
} else if (self.importScripts) { // webworker } else if (self.importScripts) { // webworker
try { try {
......
...@@ -12,11 +12,11 @@ var onmessage = function(e) { // eslint-disable-line no-unused-vars ...@@ -12,11 +12,11 @@ var onmessage = function(e) { // eslint-disable-line no-unused-vars
self[key] = data[key]; self[key] = data[key];
} }
} }
self.pyodide.runPythonAsync(data.python, () => {}).then((results) => { self.pyodide.runPythonAsync(data.python, () => {})
self.postMessage({results}); .then((results) => { self.postMessage({results}); })
}).catch((err) => { .catch((err) => {
// if you prefer messages with the error // if you prefer messages with the error
self.postMessage({error: err.message}); self.postMessage({error : err.message});
// if you prefer onerror events // if you prefer onerror events
// setTimeout(() => { throw err; }); // setTimeout(() => { throw err; });
}); });
......
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