From 88c08bd988c121d08c2daa6d2d69858e74a1b097 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Mon, 26 Mar 2018 10:11:32 +0200 Subject: [PATCH] fix: prevent Reveal opening with its hash already set to add history entry --- js/foundation.reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/foundation.reveal.js b/js/foundation.reveal.js index 847d53f53..2029e970f 100644 --- a/js/foundation.reveal.js +++ b/js/foundation.reveal.js @@ -216,8 +216,8 @@ class Reveal extends Plugin { */ open() { // either update or replace browser history - if (this.options.deepLink) { - var hash = `#${this.id}`; + const hash = `#${this.id}`; + if (this.options.deepLink && window.location.hash !== hash) { if (window.history.pushState) { if (this.options.updateHistory) { -- 2.47.2