Created
September 29, 2011 21:37
-
-
Save Sequoia/1252007 to your computer and use it in GitHub Desktop.
fix for pagify issue 7 https://github.com/cmpolis/Pagify/issues/7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pagify.js b/pagify.js | |
index 051f1ce..577d798 100644 | |
--- a/pagify.js | |
+++ b/pagify.js | |
@@ -23,7 +23,10 @@ | |
// Run after loading if caching, otherwise run immediately | |
var runAfterLoading = function() { | |
self.switchPage = function(page) { | |
- page = page || window.location.hash.replace('#',''); | |
+ if(!page){ //if there's no page selected, go back to the default | |
+ window.location.hash.replace('#',''); | |
+ page = self.settings.default; | |
+ } | |
// Load page content from cache | |
if(self.settings.cache) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment