Fix implementation in light of new safety check in tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-10-07 15:30:12 -04:00
1 parent 09e76e2518
commit a615b156e6
2 files changed
+2 -2

No files matched your search

@@ -19,7 +19,7 @@ const selectedUpdateChannelInjectable = getInjectable({
instantiate: (di): SelectedUpdateChannel => {
const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable);
const state = observable.box<UpdateChannel>();
const state = observable.box<UpdateChannel>(undefined, { deep: false });
return {
value: computed(() => state.get() ?? defaultUpdateChannel.get()),
@@ -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);