Comparing version 1.1.2 to 1.1.3
# Changelog | ||
### [1.1.3](https://www.github.com/hugomrdias/iso-url/compare/v1.1.2...v1.1.3) (2021-03-03) | ||
### Bug Fixes | ||
* add better guard against location definition ([#154](https://www.github.com/hugomrdias/iso-url/issues/154)) ([9dc71a9](https://www.github.com/hugomrdias/iso-url/commit/9dc71a9f505d39834861344c6696b0ca513400ad)) | ||
### [1.1.2](https://www.github.com/hugomrdias/iso-url/compare/v1.1.1...v1.1.2) (2021-03-01) | ||
@@ -4,0 +11,0 @@ |
@@ -10,3 +10,3 @@ export class URLWithLegacySupport { | ||
static revokeObjectURL(o: string): void; | ||
constructor(url?: string, base?: string); | ||
constructor(url?: string, base?: string | undefined); | ||
super: URL; | ||
@@ -42,3 +42,3 @@ path: string; | ||
} | ||
export const defaultBase: string; | ||
export const defaultBase: string | undefined; | ||
/** | ||
@@ -45,0 +45,0 @@ * @param {string | import('url').UrlObject} obj |
{ | ||
"name": "iso-url", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Isomorphic/Universal WHATWG URL API with some support legacy node URL API", | ||
@@ -36,3 +36,2 @@ "repository": "hugomrdias/iso-url", | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
@@ -39,0 +38,0 @@ "c8": "^7.6.0", |
'use strict' | ||
const defaultBase = | ||
self.location && self.location.protocol + '//' + self.location.host | ||
function getDefaultBase () { | ||
if (!self.location) { | ||
return | ||
} | ||
if (!self.location.protocol || !self.location.host) { | ||
return | ||
} | ||
return self.location.protocol + '//' + self.location.host | ||
} | ||
const URL = self.URL | ||
const defaultBase = getDefaultBase() | ||
@@ -7,0 +18,0 @@ class URLWithLegacySupport { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14207
288