From f82cccc53e42bb02da09c17b1f80949c3b8b4248 Mon Sep 17 00:00:00 2001 From: Hiroki Ishiura Date: Tue, 4 Dec 2018 19:16:03 +0900 Subject: [PATCH] Fixed the behavior of clicking links when running RocketChat with subdir. --- src/public/preload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/preload.js b/src/public/preload.js index 363e21226b..428a9ec607 100644 --- a/src/public/preload.js +++ b/src/public/preload.js @@ -85,8 +85,8 @@ window.addEventListener('load', () => { const { href } = anchorElement; - // Check href matching current domain - if (RegExp(`^${ location.protocol }\/\/${ location.host }`).test(href)) { + // Check href matching Rochet.Chat URL + if (RegExp(`^${ Meteor.absoluteUrl() }`).test(href)) { return; }