mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: wrong order of ids when sendToFrame is called
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
015a585a84
commit
ec9a68bf09
@ -84,11 +84,11 @@ describe("send-message-to-channel", () => {
|
|||||||
|
|
||||||
it("sends the message to individual frames in webcontents", () => {
|
it("sends the message to individual frames in webcontents", () => {
|
||||||
expect(sendToFrameMock.mock.calls).toEqual([
|
expect(sendToFrameMock.mock.calls).toEqual([
|
||||||
["first", [42, 126], "some-channel", "some-message"],
|
["first", [126, 42], "some-channel", "some-message"],
|
||||||
["first", [84, 168], "some-channel", "some-message"],
|
["first", [168, 84], "some-channel", "some-message"],
|
||||||
|
|
||||||
["second", [42, 126], "some-channel", "some-message"],
|
["second", [126, 42], "some-channel", "some-message"],
|
||||||
["second", [84, 168], "some-channel", "some-message"],
|
["second", [168, 84], "some-channel", "some-message"],
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -31,7 +31,7 @@ const sendMessageToChannelInjectable = getInjectable({
|
|||||||
(channelId: string, ...args: any[]) => webContent.send(channelId, ...args),
|
(channelId: string, ...args: any[]) => webContent.send(channelId, ...args),
|
||||||
|
|
||||||
...[...frameIds].map(({ frameId, processId }) => (channelId: string, ...args: any[]) => {
|
...[...frameIds].map(({ frameId, processId }) => (channelId: string, ...args: any[]) => {
|
||||||
webContent.sendToFrame([frameId, processId], channelId, ...args);
|
webContent.sendToFrame([processId, frameId], channelId, ...args);
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user