@zambezi/address
Advanced tools
Comparing version 2.1.0-real-urls.3 to 2.1.0-real-urls.4
@@ -794,8 +794,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var path = location.href.replace(location.origin, '') | ||
if (path.slice(0, base.length) === base) { | ||
return path.slice(base.length) | ||
} else { | ||
return path | ||
} | ||
return unbase(path) | ||
} | ||
@@ -819,2 +814,4 @@ | ||
path = unbase(path) | ||
if (path === getState()) { | ||
@@ -883,13 +880,15 @@ return false | ||
dispatcher.statechange(rebase(path).slice(base.length)) | ||
dispatcher.statechange(unbase(path)) | ||
} | ||
function rebase(path) { | ||
return base + '/' + trimSlashes(unbase(path)) | ||
} | ||
function unbase(path) { | ||
if (path.slice(0, base.length) === base) { | ||
// Remove base before adding it back in again | ||
// This is a boo-boo case | ||
path = path.slice(base.length) | ||
return path.slice(base.length) | ||
} else { | ||
return path | ||
} | ||
return base + '/' + trimSlashes(path) | ||
} | ||
@@ -896,0 +895,0 @@ |
{ | ||
"name": "@zambezi/address", | ||
"version": "2.1.0-real-urls.3", | ||
"version": "2.1.0-real-urls.4", | ||
"description": "API for nap resources", | ||
@@ -5,0 +5,0 @@ "main": "lib/address.js", |
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
94598
964