From ca6d1d1e427f36142e85bb8496f102669faba5ec Mon Sep 17 00:00:00 2001 From: BennieMeng Date: Fri, 1 Mar 2019 14:36:41 +0800 Subject: [PATCH] frontend: add link RegExp match --- src/frontend/src/app/shared/base/side-nav/side-nav-expand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/app/shared/base/side-nav/side-nav-expand.ts b/src/frontend/src/app/shared/base/side-nav/side-nav-expand.ts index 83fa90efc..c8f4d3892 100644 --- a/src/frontend/src/app/shared/base/side-nav/side-nav-expand.ts +++ b/src/frontend/src/app/shared/base/side-nav/side-nav-expand.ts @@ -46,7 +46,7 @@ export class SideNavExpand implements OnInit, OnDestroy { if (option && option.exact !== undefined) { return option.exact ? this.currentUrl === `${this.prefix}${link}` : - new RegExp(link).test(this.currentUrl); + new RegExp(`${link}\\b`).test(this.currentUrl); } else { return this.currentUrl === `${this.prefix}${link}`; }