@@ -1285,26 +1285,23 @@ Raven.prototype = {
1285
1285
}
1286
1286
} ;
1287
1287
1288
- fill (
1289
- history ,
1290
- 'pushState' ,
1291
- function ( origPushState ) {
1292
- // note history.pushState.length is 0; intentionally not declaring
1293
- // params to preserve 0 arity
1294
- return function ( /* state, title, url */ ) {
1295
- var url = arguments . length > 2 ? arguments [ 2 ] : undefined ;
1296
-
1297
- // url argument is optional
1298
- if ( url ) {
1299
- // coerce to string (this is what pushState does)
1300
- self . _captureUrlChange ( self . _lastHref , url + '' ) ;
1301
- }
1288
+ var historyReplacementFunction = function ( origHistFunction ) {
1289
+ // note history.pushState.length is 0; intentionally not declaring
1290
+ // params to preserve 0 arity
1291
+ return function ( /* state, title, url */ ) {
1292
+ var url = arguments . length > 2 ? arguments [ 2 ] : undefined ;
1293
+
1294
+ // url argument is optional
1295
+ if ( url ) {
1296
+ // coerce to string (this is what pushState does)
1297
+ self . _captureUrlChange ( self . _lastHref , url + '' ) ;
1298
+ }
1302
1299
1303
- return origPushState . apply ( this , arguments ) ;
1304
- } ;
1305
- } ,
1306
- wrappedBuiltIns
1307
- ) ;
1300
+ return origHistFunction . apply ( this , arguments ) ;
1301
+ } ;
1302
+ } ;
1303
+
1304
+ fill ( history , 'pushState' , historyReplacementFunction , wrappedBuiltIns ) ;
1308
1305
}
1309
1306
1310
1307
if ( autoBreadcrumbs . console && 'console' in _window && console . log ) {
0 commit comments