diff --git a/src/frontend/service/header.service.ts b/src/frontend/service/header.service.ts index c5c9c3154a7a3c5d7564eb95bb671778ee148800..8ff773977bda7f0a7b4ca34f1fb5ddeb5c42513a 100755 --- a/src/frontend/service/header.service.ts +++ b/src/frontend/service/header.service.ts @@ -33,14 +33,15 @@ export class HeaderService { } getShortcut() { - this.http.get('../../rest/shortcuts').pipe( - filter(() => this.shortcut === null), - tap((data: any) => this.setShortcut(data.shortcuts)), - catchError((err: any) => { - console.log(err); - return of(false); - }) - ).subscribe(); + if (this.shortcut === null) { + this.http.get('../../rest/shortcuts').pipe( + tap((data: any) => this.setShortcut(data.shortcuts)), + catchError((err: any) => { + console.log(err); + return of(false); + }) + ).subscribe(); + } } refreshShortcuts() {