diff --git a/src/helper/object.js b/src/helper/object.js index fddf0335..542600aa 100644 --- a/src/helper/object.js +++ b/src/helper/object.js @@ -145,6 +145,9 @@ function getOriginFromUrl(url) { return undefined; } var parsed = getLocationFromUrl(url); + if (!parsed) { + return null; + } var origin = parsed.protocol + '//' + parsed.hostname; if (parsed.port) { origin += ':' + parsed.port;