File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,11 @@ var URLStore = {
139
139
if ( location === 'hash' && window . location . hash === '' )
140
140
URLStore . replace ( '/' ) ;
141
141
142
- if ( window . addEventListener ) //check for IE 8
142
+ if ( window . addEventListener ) { //check for IE 8
143
143
window . addEventListener ( changeEvent , notifyChange , false ) ;
144
- else
144
+ } else {
145
145
window . attachEvent ( changeEvent , notifyChange ) ;
146
+ }
146
147
147
148
notifyChange ( ) ;
148
149
} ,
@@ -156,7 +157,11 @@ var URLStore = {
156
157
157
158
var changeEvent = CHANGE_EVENTS [ _location ] ;
158
159
159
- window . removeEventListener ( changeEvent , notifyChange , false ) ;
160
+ if ( window . addEventListener ) {
161
+ window . removeEventListener ( changeEvent , notifyChange , false ) ;
162
+ } else {
163
+ window . detachEvent ( changeEvent , notifyChange ) ;
164
+ }
160
165
161
166
_location = null ;
162
167
} ,
You can’t perform that action at this time.
0 commit comments