Comparing version 1.1.4 to 1.1.6
@@ -30,2 +30,8 @@ | ||
function dlocHashEmpty() { | ||
// Non-IE browsers return '' when the address bar shows '#'; Director's logic | ||
// assumes both mean empty. | ||
return dloc.hash === '' || dloc.hash === '#'; | ||
} | ||
var listener = { | ||
@@ -195,5 +201,5 @@ mode: 'modern', | ||
if (this.history === false) { | ||
if (dloc.hash === '' && r) { | ||
if (dlocHashEmpty() && r) { | ||
dloc.hash = r; | ||
} else if (dloc.hash.length > 0) { | ||
} else if (!dlocHashEmpty()) { | ||
self.dispatch('on', dloc.hash.replace(/^#/, '')); | ||
@@ -203,3 +209,3 @@ } | ||
else { | ||
routeTo = dloc.hash === '' && r ? r : dloc.hash.length > 0 ? dloc.hash.replace(/^#/, '') : null; | ||
var routeTo = dlocHashEmpty() && r ? r : !dlocHashEmpty() ? dloc.hash.replace(/^#/, '') : null; | ||
if (routeTo) { | ||
@@ -206,0 +212,0 @@ window.history.replaceState({}, document.title, routeTo); |
@@ -5,3 +5,3 @@ { | ||
"author": "Nodejitsu Inc. <info@nodejitsu.com>", | ||
"version": "1.1.4", | ||
"version": "1.1.6", | ||
"maintainers": [ | ||
@@ -25,3 +25,3 @@ "hij1nx <paolo@nodejitsu.com>", | ||
"devDependencies": { | ||
"codesurgeon": "0.3.x", | ||
"codesurgeon": "~0.3.4", | ||
"colors": "0.5.x", | ||
@@ -35,3 +35,3 @@ "api-easy": "0.3.x", | ||
"ender": "./build/ender.js", | ||
"browserify": "./build/director-1.1.4", | ||
"browserify": "./build/director-1.1.5", | ||
"main": "./lib/director", | ||
@@ -38,0 +38,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
182635
4128