References to window.location.origin found in two places. window.location.origin doesn't exists in IE11.
This in link:
export function isLocal (href) {
const origin = window.location.origin
return !/^(https?:)?\/\//.test(href) ||
origin === href.substr(0, origin.length)
}
This in router:
function getURL () {
const { href, origin } = window.location
return href.substring(origin.length)
}
IE11 compatible replacement:
const origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port: '')
We can either polyfill window.location.origin (not a huge fan of polyfills) or replace the line in both chunks.