1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

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 2022-10-07 15:30:12 -04:00
parent 09e76e2518
commit a615b156e6
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -54,7 +54,7 @@ export const overrideMessagingFromMainToWindow = (): OverriddenWindowMessaging =
try { try {
data = deserialize(serialize(data)); data = deserialize(serialize(data));
} catch (error) { } 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); const windowListeners = getWindowListeners(channel, windowId);