From 3a7b43c663ecb41a5f777f2ba95a9fd978c82bbe Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 7 Sep 2022 21:27:36 +0200 Subject: [PATCH] dodge firefox race (thx exci) --- copyparty/web/util.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 56c7cad2..d0c8595a 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -876,14 +876,18 @@ function scfg_bind(obj, oname, cname, defval, cb) { function hist_push(url) { console.log("h-push " + url); - if (window.history && history.pushState) + try { history.pushState(url, url, url); + } + catch (ex) { } } function hist_replace(url) { console.log("h-repl " + url); - if (window.history && history.replaceState) + try { history.replaceState(url, url, url); + } + catch (ex) { } // ff "The operation is insecure." on rapid switches } function sethash(hv) {