From 8b9f1aecac3325fb5c4fe51be281fc61d763c5a1 Mon Sep 17 00:00:00 2001 From: Behind The Math Date: Thu, 21 Dec 2017 23:29:47 -0500 Subject: [PATCH] Change default timeout to 0 (disabled) --- README.md | 2 +- lib/proto/parse-options.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d83afe2..7e6a1ce 100644 --- a/README.md +++ b/README.md @@ -392,7 +392,7 @@ Useful to debug page layout differences. When set to true, clicking on a link that point the current url trigger a full page reload. -##### `timeout` (Integer, default to 10000) +##### `timeout` (Integer, default to 0) The timeout in milliseconds for the XHR requests. Set to 0 to disable the timeout. diff --git a/lib/proto/parse-options.js b/lib/proto/parse-options.js index 7465eea..d773cad 100644 --- a/lib/proto/parse-options.js +++ b/lib/proto/parse-options.js @@ -23,7 +23,7 @@ module.exports = function(options){ this.options.scrollTo = (typeof this.options.scrollTo === 'undefined') ? 0 : this.options.scrollTo; this.options.cacheBust = (typeof this.options.cacheBust === 'undefined') ? true : this.options.cacheBust this.options.debug = this.options.debug || false - this.options.timeout = this.options.timeout || 10000 + this.options.timeout = this.options.timeout || 0 // we can’t replace body.outerHTML or head.outerHTML // it create a bug where new body or new head are created in the dom @@ -38,4 +38,4 @@ module.exports = function(options){ if (typeof options.analytics !== "function") { options.analytics = function() {} } -} \ No newline at end of file +}