aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/preamble.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js
index eaa02c90..4101fc72 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -395,6 +395,7 @@ try {
xhr.open("GET", url, false);
xhr.overrideMimeType('text/plain; charset=x-user-defined'); // ask for binary data
xhr.send(null);
+ if (xhr.status != 200 && xhr.status != 0) throw 'failed to open: ' + url;
return xhr.responseText;
}
}