complete performance and reliability follow-ups
This commit is contained in:
@@ -170,7 +170,8 @@ export const UPLOAD_RUNTIME = `
|
||||
});
|
||||
xhr.addEventListener("load", function () {
|
||||
var data = null;
|
||||
try { data = JSON.parse(xhr.responseText); } catch (e2) {}
|
||||
try { data = JSON.parse(xhr.responseText); }
|
||||
catch (error) { console.warn("[wrnexus:uploader] upload response was not valid JSON", error); }
|
||||
if (xhr.status >= 200 && xhr.status < 300 && data && data.ok) {
|
||||
done(ui, (data.files && data.files[0]) || null, file);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user