mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
[PR #922] Fix sendToIpcRenderer parameter handling #1358
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/ElectronNET/Electron.NET/pull/922
State: closed
Merged: Yes
The spread operator must not be used for the data parameter because the params are provided by data as an array and not as function arguments (which the spread operator would collect).
The way it was caused the data parameter to be wrapped in an array once again (n-size data array wrapped inside a single-element array), so the later spread operator unpacks the outer array instead of spreading out the data array as multiple parameters.