File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 988
988
if ( options . saveState && $ . cookie )
989
989
{
990
990
var savedState = $ . cookie ( _cookiePrefix + getUniqueId ( wizard ) ) ;
991
- // Sets the saved position to the start index if not undefined or out of range set
992
- if ( savedState != null && Number ( savedState ) < state . stepCount )
991
+ // Sets the saved position to the start index if not undefined or out of range
992
+ var savedIndex = parseInt ( savedState , 0 ) ;
993
+ if ( ! isNaN ( savedIndex ) && savedIndex < state . stepCount )
993
994
{
994
- startIndex = Number ( savedState ) ;
995
+ startIndex = savedIndex ;
995
996
}
996
997
}
997
998
1312
1313
content = header . next ( ".body" ) ,
1313
1314
mode = ( content . data ( "mode" ) == null ) ? $ . fn . steps . contentMode . html :
1314
1315
getValidEnumValue ( $ . fn . steps . contentMode , ( / ^ \s * $ / . test ( content . data ( "mode" ) ) || isNaN ( content . data ( "mode" ) ) ) ?
1315
- content . data ( "mode" ) : Number ( content . data ( "mode" ) ) ) ,
1316
+ content . data ( "mode" ) : parseInt ( content . data ( "mode" ) , 0 ) ) ,
1316
1317
contentUrl = ( mode === $ . fn . steps . contentMode . html || content . data ( "url" ) === undefined ) ?
1317
1318
"" : content . data ( "url" ) ,
1318
1319
contentLoaded = ( mode !== $ . fn . steps . contentMode . html && content . data ( "loaded" ) === "1" ) ;
1429
1430
*/
1430
1431
function getStepPosition ( anchor )
1431
1432
{
1432
- return Number ( anchor . attr ( "href" ) . substring ( anchor . attr ( "href" ) . lastIndexOf ( "-" ) + 1 ) ) ;
1433
+ return parseInt ( anchor . attr ( "href" ) . substring ( anchor . attr ( "href" ) . lastIndexOf ( "-" ) + 1 ) , 0 ) ;
1433
1434
}
1434
1435
1435
1436
/**
You can’t perform that action at this time.
0 commit comments