From 5442699549632f303f6f270db289a30805a56a46 Mon Sep 17 00:00:00 2001 From: rhysd Date: Wed, 19 Apr 2017 00:45:53 +0900 Subject: [PATCH] avoid reloading the same page --- renderer/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderer/index.ts b/renderer/index.ts index f78c6d2..dfb2c68 100644 --- a/renderer/index.ts +++ b/renderer/index.ts @@ -35,7 +35,9 @@ function setupKeybinds(keybinds: {[key: string]: string}, host: string) { const url = `https://${host}${action}`; log.info('URL Shortcut:', url); e.preventDefault(); - window.location.href = url; + if (window.location.href !== url) { + window.location.href = url; + } }); } else { const func = ShortcutActions[action];