From 8a88295d04aed5dbcac99dcaf4b4ca282f7b49ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 2 Nov 2021 20:05:17 -0400 Subject: [PATCH] fix: don't highlight external nav items --- public/src/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index bacbc2309d..1cf4471fb5 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -285,8 +285,8 @@ app.cacheBuster = null; .removeClass('active') .find('a') .filter(function (i, x) { - return window.location.pathname === x.pathname || - window.location.pathname.startsWith(x.pathname + '/'); + return window.location.hostname === x.hostname && (window.location.pathname === x.pathname || + window.location.pathname.startsWith(x.pathname + '/')); }) .parent() .addClass('active');