organism-react-ajax
Advanced tools
Comparing version 0.0.6 to 0.0.8
@@ -138,7 +138,7 @@ 'use strict'; | ||
} | ||
var updateWithUrl = state.get('updateWithUrl'); | ||
if (updateWithUrl) { | ||
updateWithUrl(rawUrl); | ||
} | ||
if (!state.get('ajax')) { | ||
var updateWithUrl = state.get('updateWithUrl'); | ||
if (updateWithUrl) { | ||
updateWithUrl(rawUrl); | ||
} | ||
return state; | ||
@@ -145,0 +145,0 @@ } |
@@ -45,5 +45,4 @@ 'use strict'; | ||
value: function componentDidMount() { | ||
window.onpopstate = function (e) { | ||
var updateWithUrl = function updateWithUrl(url) { | ||
var pageState = _ajaxStore2.default.getState(); | ||
var url = document.URL; | ||
if (pageState.get('url') !== url) { | ||
@@ -58,2 +57,15 @@ (0, _ajaxDispatcher.ajaxDispatch)({ | ||
}; | ||
setTimeout(function () { | ||
(0, _ajaxDispatcher.ajaxDispatch)({ | ||
type: 'config/set', | ||
params: { | ||
updateWithUrl: updateWithUrl | ||
} | ||
}); | ||
}); | ||
window.onpopstate = function (e) { | ||
var pageState = _ajaxStore2.default.getState(); | ||
var updateWithUrl = pageState.get('updateWithUrl'); | ||
updateWithUrl(document.URL); | ||
}; | ||
} | ||
@@ -60,0 +72,0 @@ }, { |
{ | ||
"name": "organism-react-ajax", | ||
"version": "0.0.6", | ||
"version": "0.0.8", | ||
"description": "React Ajax", | ||
@@ -5,0 +5,0 @@ "main": "./build/src/index.js", |
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
26982
558