@availity/resolve-url
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.0.3](https://github.com/Availity/sdk-js/compare/@availity/resolve-url@1.0.2...@availity/resolve-url@1.0.3) (2019-04-26) | ||
### Bug Fixes | ||
* **resolve-url:** use window.location.origin ([bcfe310](https://github.com/Availity/sdk-js/commit/bcfe310)) | ||
## [1.0.2](https://github.com/Availity/sdk-js/compare/@availity/resolve-url@1.0.1...@availity/resolve-url@1.0.2) (2019-04-25) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@availity/resolve-url", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Resolve absolute url from relative urls", | ||
@@ -15,3 +15,3 @@ "main": "resolve-url.js", | ||
}, | ||
"gitHead": "f37d9f86eb6aeb5341f662996322934bfcbf8fd9" | ||
"gitHead": "f161f5a028029c9528958622bff9b2168d35ad9a" | ||
} |
@@ -10,5 +10,4 @@ import isAbsoluteUrl from './is-absolute-url'; | ||
if (!base) { | ||
const { href, pathname } = window.location; | ||
const index = href.indexOf(pathname); | ||
base = `${href.substring(0, index)}/`; | ||
const { origin } = window.location; | ||
base = `${origin}/`; | ||
} | ||
@@ -15,0 +14,0 @@ |
@@ -6,3 +6,3 @@ import resolveUrl from '.'; | ||
global.jsdom.reconfigure({ | ||
url: 'https://dev.local/other/', | ||
url: 'https://dev.local/', | ||
}); | ||
@@ -33,3 +33,3 @@ }); | ||
global.jsdom.reconfigure({ | ||
url: 'https://dev.local/other', | ||
url: 'https://dev.local/other/', | ||
}); | ||
@@ -36,0 +36,0 @@ |
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
35026
732