We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dd3e2a commit 924bd1bCopy full SHA for 924bd1b
client/index.js
@@ -8,7 +8,8 @@ if (typeof __resourceQuery === "string" && __resourceQuery) {
8
} else {
9
// Else, get the url from the <script> this file was called with.
10
var scriptElements = document.getElementsByTagName("script");
11
- var scriptHost = scriptElements[scriptElements.length-1].getAttribute("src").replace(/\/[^\/]+$/, "");
+ var scriptHost = scriptElements[scriptElements.length-1].getAttribute("src");
12
+ scriptHost = scriptHost && scriptHost.replace(/\/[^\/]+$/, "");
13
urlParts = url.parse((scriptHost ? scriptHost : "/"), false, true);
14
}
15
0 commit comments