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:
parent
09e76e2518
commit
a615b156e6
@ -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()),
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user