From 31c565abc9c060b2576b80e5ff937fa46a0b123f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 20 May 2018 18:25:37 -0600 Subject: [PATCH] Make sure the auth error message is shown --- .../sticker-picker/sticker-picker.component.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts b/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts index 1fb8a9d..7be2350 100644 --- a/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts +++ b/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts @@ -38,12 +38,16 @@ export class StickerPickerWidgetWrapperComponent extends CapableWidget implement if (!params.widgetId) { console.error("No widgetId query parameter"); this.authError = true; + this.isLoading = false; } else { ScalarWidgetApi.widgetId = params.widgetId; } - SessionStorage.scalarToken = token; - this.authError = !token; + if (!this.authError) { + SessionStorage.scalarToken = token; + this.authError = !token; + this.isLoading = !this.authError; + } } public ngOnInit() { @@ -77,6 +81,7 @@ export class StickerPickerWidgetWrapperComponent extends CapableWidget implement } catch (e) { console.error(e); this.authError = true; + this.isLoading = false; return; } }