Skip to content

Instantly share code, notes, and snippets.

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