Verified Commit c2670b3d authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Fix #187 by adding an exception handler

parent a7187a83
......@@ -106,7 +106,17 @@ var LoadWatcher = new Class({
shouldLoad: function (contentType, contentLocation, requestOrigin, node) {
if (contentType == SCRIPT_CONTENT_TYPE && mappings[contentLocation.host]) {
let contentHost;
try {
contentHost = contentLocation.host;
} catch (exception) {
// Accept the resource load request.
return REQUEST_ACCEPTATION;
}
if (contentType == SCRIPT_CONTENT_TYPE && mappings[contentHost]) {
if (node instanceof SCRIPT_ELEMENT) {
......
Supports Markdown
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