@@ -177,7 +177,7 @@ <h2>Would you like to resume where you left off?</h2>
177177 /**
178178 * Fired when user advances a codelab step or goes backwards.
179179 * @event google-codelab-step
180- * @ detail {{step: Object, index: Number}}
180+ * detail {{step: Object, index: Number}}
181181 */
182182
183183 /**
@@ -350,7 +350,7 @@ <h2>Would you like to resume where you left off?</h2>
350350 ready : function ( ) {
351351 // TODO: cannot be done on prototype.
352352 // SEe https://github.com/PolymerElements/iron-a11y-keys-behavior/issues/19
353- this . keyEventTarget = document . body ;
353+ this . keyEventTarget = /** @type { !HTMLBodyElement } */ ( document . body ) ;
354354
355355 // select the step early, before localStorage is loaded
356356 this . _updateStepIndexFromUrl ( ) ;
@@ -410,7 +410,7 @@ <h2>Would you like to resume where you left off?</h2>
410410 var step = this . steps [ this . selected ] ;
411411 step . active = true ;
412412
413- location . hash = this . selected ;
413+ location . hash = this . selected . toString ( ) ;
414414
415415 this . fire ( 'google-codelab-step' , { index : this . selected , step : step } ) ;
416416
@@ -447,7 +447,7 @@ <h2>Would you like to resume where you left off?</h2>
447447 } ,
448448
449449 _updateStepIndexFromUrl : function ( ) {
450- var step = parseInt ( location . hash . slice ( 1 ) ) ;
450+ var step = parseInt ( location . hash . slice ( 1 ) , 10 ) ;
451451 if ( isNaN ( step ) || step < 0 ) {
452452 step = 0 ;
453453 }
0 commit comments