From: Fil Date: Thu, 15 Mar 2012 17:00:26 +0000 (+0100) Subject: Do not fail on other kinds of hashes X-Git-Tag: 1.2.0~12^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=81cda2145f9da7024e4f4e1c15186da3e41049d7;p=reveal.js.git Do not fail on other kinds of hashes --- diff --git a/js/reveal.js b/js/reveal.js index ff0c47a..94fcf37 100644 --- a/js/reveal.js +++ b/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 ); }