@@ -1420,15 +1420,17 @@ $.ui.position.fieldTip = {
14201420 else if ( stripped . length === 2 ) arr = [ stripped , '0' ] ;
14211421 else if ( stripped . length === 3 ) arr = [ stripped . substring ( 0 , 1 ) , stripped . substring ( 1 ) ] ;
14221422 else if ( stripped . length > 2 ) arr = [ stripped . substring ( 0 , 1 ) , stripped . substring ( 2 ) ] ;
1423- if ( arr . length > 0 ) {
1424- hrs = parseInt ( arr [ 0 ] . replace ( / \D / g) , 10 ) ;
1425- //bAddHrs = (indexOfAny(arr[0], ['P', 'p']) !== -1);
1426- if ( hrs === 12 && ! bAddHrs ) hrs = 0 ;
1427- }
1428- if ( arr . length > 1 ) {
1429- mins = parseInt ( arr [ 1 ] . replace ( / \D / g) , 10 ) ;
1430- //bAddHrs = (indexOfAny(arr[1], ['P', 'p']) !== -1);
1431- //if (hrs === 12 && !bAddHrs) hrs = 0;
1423+ if ( typeof arr !== 'undefined' ) {
1424+ if ( arr . length > 0 ) {
1425+ hrs = parseInt ( arr [ 0 ] . replace ( / \D / g) , 10 ) ;
1426+ //bAddHrs = (indexOfAny(arr[0], ['P', 'p']) !== -1);
1427+ if ( hrs === 12 && ! bAddHrs ) hrs = 0 ;
1428+ }
1429+ if ( arr . length > 1 ) {
1430+ mins = parseInt ( arr [ 1 ] . replace ( / \D / g) , 10 ) ;
1431+ //bAddHrs = (indexOfAny(arr[1], ['P', 'p']) !== -1);
1432+ //if (hrs === 12 && !bAddHrs) hrs = 0;
1433+ }
14321434 }
14331435 if ( isNaN ( hrs ) ) hrs = 0 ;
14341436 if ( isNaN ( mins ) ) mins = 0 ;
0 commit comments