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; }