@actuallab/rpc 13.0.15 → 13.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2534,12 +2534,18 @@ var RpcPeer = class {
2534
2534
  if (method === RpcSystemCalls.handshake) {
2535
2535
  const raw = args[0];
2536
2536
  if (raw !== void 0) {
2537
+ const obj = raw ?? {};
2537
2538
  const handshake = Array.isArray(raw) ? {
2538
2539
  RemotePeerId: raw[0],
2539
2540
  RemoteHubId: raw[2],
2540
2541
  ProtocolVersion: raw[3],
2541
2542
  Index: raw[4]
2542
- } : raw;
2543
+ } : {
2544
+ RemotePeerId: obj.RemotePeerId ?? obj.remotePeerId,
2545
+ RemoteHubId: obj.RemoteHubId ?? obj.remoteHubId,
2546
+ ProtocolVersion: obj.ProtocolVersion ?? obj.protocolVersion,
2547
+ Index: obj.Index ?? obj.index
2548
+ };
2543
2549
  this._onHandshakeReceived(handshake);
2544
2550
  }
2545
2551
  return;