소스 검색

Merge pull request #20 from Fil/master

reveal.js was failing when the hash was of an unexpected format
Hakim El Hattab 13 년 전
부모
커밋
a77842521e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      js/reveal.js

+ 2 - 2
js/reveal.js

@@ -528,8 +528,8 @@ var Reveal = (function(){
 		var bits = window.location.hash.slice(2).split('/');
 		
 		// Read the index components of the hash
-		indexh = bits[0] ? parseInt( bits[0] ) : 0;
-		indexv = bits[1] ? parseInt( bits[1] ) : 0;
+		indexh = parseInt( bits[0] ) || 0 ;
+		indexv = parseInt( bits[1] ) || 0 ;
 		
 		navigateTo( indexh, indexv );
 	}