From 50114abeacb87556b721e2dfa05f4a078dbe742c Mon Sep 17 00:00:00 2001 From: Milan Klanjsek Date: Thu, 11 Feb 2021 10:16:08 -0700 Subject: [PATCH] Fixed problem with preferences forcing app reload Signed-off-by: Milan Klanjsek --- .../shared/services/preferences/preferences.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/app/modules/shared/services/preferences/preferences.service.ts b/web/src/app/modules/shared/services/preferences/preferences.service.ts index 46d0b3001d..5b7d2986d6 100644 --- a/web/src/app/modules/shared/services/preferences/preferences.service.ts +++ b/web/src/app/modules/shared/services/preferences/preferences.service.ts @@ -130,7 +130,9 @@ export class PreferencesService implements OnDestroy { const isLightTheme = update['general.theme'] === 'light'; const frontendUrl = update['development.frontendUrl']; const verbose = update['development.verbose'] === 'debug'; - const embedded = update['development.embedded'] === 'embedded'; + const embedded = update['development.embedded'] + ? update['development.embedded'] === 'embedded' + : true; let notificationRequired = false; if (this.showLabels.value !== showLabels) { @@ -145,7 +147,7 @@ export class PreferencesService implements OnDestroy { this.themeService.switchTheme(); } - if (this.frontendUrl.value !== frontendUrl) { + if (frontendUrl && this.frontendUrl.value !== frontendUrl) { notificationRequired = true; this.frontendUrl.next(frontendUrl); }