flux-router-component
Advanced tools
Comparing version 0.5.16 to 0.5.17
@@ -10,2 +10,6 @@ /** | ||
function isUndefined(v) { | ||
return v === undefined; | ||
} | ||
/** | ||
@@ -78,12 +82,5 @@ * This only supports pushState for the browsers with native pushState support. | ||
if (this._hasPushState) { | ||
try { | ||
// not calling pushState(state, title, url), because | ||
// some browsers update url with '/undefined' if url is undefined | ||
win.history.pushState.apply(win.history, arguments); | ||
} catch (error) { | ||
// firefox 35 requires 3 args for pushState | ||
if (arguments.length < 3) { | ||
win.history.pushState(state, title, url); | ||
} | ||
} | ||
title = isUndefined(title) ? win.document.title : title; | ||
url = isUndefined(url) ? win.location.href : url; | ||
win.history.pushState(state, title, url); | ||
this.setTitle(title); | ||
@@ -105,12 +102,5 @@ } else if (url) { | ||
if (this._hasPushState) { | ||
try { | ||
// not calling pushState(state, title, url), because | ||
// some browsers update url with '/undefined' if url is undefined | ||
win.history.replaceState.apply(win.history, arguments); | ||
} catch (error) { | ||
// firefox 35 requires 3 args for replaceState | ||
if (arguments.length < 3) { | ||
win.history.replaceState(state, title, url); | ||
} | ||
} | ||
title = isUndefined(title) ? win.document.title : title; | ||
url = isUndefined(url) ? win.location.href : url; | ||
win.history.replaceState(state, title, url); | ||
this.setTitle(title); | ||
@@ -117,0 +107,0 @@ } else if (url) { |
{ | ||
"name": "flux-router-component", | ||
"version": "0.5.16", | ||
"version": "0.5.17", | ||
"description": "Router-related React component and mixin for applications with Fluxible architecture", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,6 @@ /** | ||
function isUndefined(v) { | ||
return v === undefined; | ||
} | ||
/** | ||
@@ -140,12 +144,5 @@ * @class HistoryWithHash | ||
if (this._hasPushState) { | ||
try { | ||
// not calling pushState(state, title, url), because | ||
// some browsers update url with '/undefined' if url is undefined | ||
history.pushState.apply(history, arguments); | ||
} catch (error) { | ||
// firefox 35 requires 3 args for pushState | ||
if (arguments.length < 3) { | ||
history.pushState(state, title, url); | ||
} | ||
} | ||
title = isUndefined(title) ? win.document.title : title; | ||
url = isUndefined(url) ? win.location.href : url; | ||
history.pushState(state, title, url); | ||
this.setTitle(title); | ||
@@ -187,12 +184,5 @@ } else if (url) { | ||
if (this._hasPushState) { | ||
try { | ||
// not calling replaceState(state, title, url), because | ||
// some browsers update url with '/undefined' if url is undefined | ||
history.replaceState.apply(history, arguments); | ||
} catch (error) { | ||
// firefox 35 requires 3 args for replaceState | ||
if (arguments.length < 3) { | ||
history.replaceState(state, title, url); | ||
} | ||
} | ||
title = isUndefined(title) ? win.document.title : title; | ||
url = isUndefined(url) ? win.location.href : url; | ||
history.replaceState(state, title, url); | ||
this.setTitle(title); | ||
@@ -199,0 +189,0 @@ } else if (url) { |
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
42358
17
607