From a615b156e61978feb4223f3058d9e5e46b1818ca Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 7 Oct 2022 15:30:12 -0400 Subject: [PATCH] Fix implementation in light of new safety check in tests Signed-off-by: Sebastian Malton --- .../selected-update-channel.injectable.ts | 2 +- .../channel-fakes/override-messaging-from-main-to-window.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/application-update/selected-update-channel/selected-update-channel.injectable.ts b/src/common/application-update/selected-update-channel/selected-update-channel.injectable.ts index 8ca31e00aa..d11778b9bd 100644 --- a/src/common/application-update/selected-update-channel/selected-update-channel.injectable.ts +++ b/src/common/application-update/selected-update-channel/selected-update-channel.injectable.ts @@ -19,7 +19,7 @@ const selectedUpdateChannelInjectable = getInjectable({ instantiate: (di): SelectedUpdateChannel => { const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable); - const state = observable.box(); + const state = observable.box(undefined, { deep: false }); return { value: computed(() => state.get() ?? defaultUpdateChannel.get()), diff --git a/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts b/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts index 22a74917b1..f9275c18b2 100644 --- a/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts +++ b/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts @@ -54,7 +54,7 @@ export const overrideMessagingFromMainToWindow = (): OverriddenWindowMessaging = try { data = deserialize(serialize(data)); } catch (error) { - throw new Error("Tried to send data that is not compatible with StructuredClone"); + throw new Error(`Tried to send a message to channel "${channel}" that is not compatible with StructuredClone: ${error}`); } const windowListeners = getWindowListeners(channel, windowId);