Fix build after PR merge

Re-adding .net6 caused the collection expression to fail
This commit is contained in:
softworkz
2025-12-12 01:39:02 +01:00
committed by GitHub
parent 49eaa5e129
commit 33da428c45

View File

@@ -233,7 +233,7 @@ namespace ElectronNET.API
public async Task SetMenuItems(MenuItem[] menuItems)
{
menuItems.AddMenuItemsId();
await BridgeConnector.Socket.Emit("set-contextMenu", [menuItems]).ConfigureAwait(false);
await BridgeConnector.Socket.Emit("set-contextMenu", new object[] { menuItems }).ConfigureAwait(false);
_items.Clear();
_items.AddRange(menuItems);
@@ -365,4 +365,4 @@ namespace ElectronNET.API
public async Task Once<T>(string eventName, Action<T> action)
=> await Events.Instance.Once(ModuleName, eventName, action).ConfigureAwait(false);
}
}
}