From f7cce3c04d13e6325efa6876d86310ffdce0e1cb Mon Sep 17 00:00:00 2001 From: Anthony Hughes Date: Sat, 1 Oct 2016 19:23:57 +0200 Subject: [PATCH] Fixed issue where couldn't set history state to 'false' --- lib/proto/parse-options.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/proto/parse-options.js b/lib/proto/parse-options.js index 5384e5b..ea765e1 100644 --- a/lib/proto/parse-options.js +++ b/lib/proto/parse-options.js @@ -6,7 +6,7 @@ module.exports = function(options){ this.options.selectors = this.options.selectors || ["title", ".js-Pjax"] this.options.switches = this.options.switches || {} this.options.switchesOptions = this.options.switchesOptions || {} - this.options.history = this.options.history || true + this.options.history = (typeof this.options.history === 'undefined') ? true : this.options.history this.options.analytics = this.options.analytics || function() { // options.backward or options.foward can be true or undefined // by default, we do track back/foward hit @@ -35,4 +35,4 @@ module.exports = function(options){ if (typeof options.analytics !== "function") { options.analytics = function() {} } -} \ No newline at end of file +}