@@ -48,8 +48,8 @@ module.exports = Backbone.Router.extend({
4848 this . navigate ( translatedRoute , { trigger : true } ) ;
4949 } ) ;
5050 } ) ;
51- history . size = - 1 ;
52- history . position = - 1 ;
51+ window . historySize = - 1 ;
52+ window . historyPosition = - 1 ;
5353 window . historyAction = 'default' ;
5454 } ,
5555
@@ -109,23 +109,23 @@ module.exports = Backbone.Router.extend({
109109
110110 execute : function ( callback , args , name ) {
111111 if ( historyAction == 'default' ) {
112- history . position += 1 ;
113- history . size = history . position ;
112+ historyPosition += 1 ;
113+ historySize = historyPosition ;
114114 } else if ( historyAction == 'back' ) {
115- history . position -= 1 ;
115+ historyPosition -= 1 ;
116116 } else if ( historyAction == 'forward' && this . previousName != name && name != "index" ) {
117117 //don't increment if the same state is navigated to twice
118118 //don't increment on index since that isn't a real state
119- history . position += 1 ;
119+ historyPosition += 1 ;
120120 }
121- window . historyAction = 'default' ;
121+ historyAction = 'default' ;
122122
123- if ( history . position == history . size )
123+ if ( historyPosition == historySize )
124124 $ ( '.js-navFwd' ) . addClass ( 'disabled' ) ;
125125 else
126126 $ ( '.js-navFwd' ) . removeClass ( 'disabled' ) ;
127127
128- if ( history . position == 1 )
128+ if ( historyPosition == 1 )
129129 $ ( '.js-navBack' ) . addClass ( 'disabled' ) ;
130130 else
131131 $ ( '.js-navBack' ) . removeClass ( 'disabled' ) ;
0 commit comments