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