We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6424893 commit 26634f7Copy full SHA for 26634f7
modules/stores/URLStore.js
@@ -3,7 +3,7 @@ var invariant = require('react/lib/invariant');
3
var warning = require('react/lib/warning');
4
5
var CHANGE_EVENTS = {
6
- hash: 'hashchange',
+ hash: (window.addEventListener) ? 'hashchange' : 'onhashchange',
7
history: 'popstate'
8
};
9
@@ -139,7 +139,10 @@ var URLStore = {
139
if (location === 'hash' && window.location.hash === '')
140
URLStore.replace('/');
141
142
- window.addEventListener(changeEvent, notifyChange, false);
+ if (window.addEventListener) //check for IE 8
143
+ window.addEventListener(changeEvent, notifyChange, false);
144
+ else
145
+ window.attachEvent(changeEvent, notifyChange);
146
147
notifyChange();
148
},
0 commit comments