web/admin: default to users path in sidebar link

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-07-02 22:53:16 +02:00
parent 5f4812e1d0
commit 2a2ae4bc4f
2 changed files with 7 additions and 2 deletions

View File

@ -123,7 +123,8 @@ export class SidebarItem extends LitElement {
return false;
}
if (this.path) {
if (new RegExp(`^${this.path}$`).exec(path)) {
const ourPath = this.path.split(";")[0];
if (new RegExp(`^${ourPath}$`).exec(path)) {
return true;
}
}