You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a crash when using this lib with superjson. The stack trace indicated that superjson.deserialize was being called with the input being undefined.
Seems like this function needs to look for the presence of operation.input before calling deserialize, or else filter by the operation method if it is a stable API.
The text was updated successfully, but these errors were encountered:
I noticed a crash when using this lib with
superjson
. The stack trace indicated thatsuperjson.deserialize
was being called with the input being undefined.A little digging and console logging led me to notice that this was happening for
subscription.stop
methods (which are being emitted here: https://github.com/jsonnull/electron-trpc/blob/main/packages/electron-trpc/src/renderer/ipcLink.ts#L77-L80) because they don't have aninput
property.Thus when the
handleIPCOperation
function picks this up on the main thread, it is callingdeserialize
on an empty object (here: https://github.com/jsonnull/electron-trpc/blob/main/packages/electron-trpc/src/main/handleIPCOperation.ts#L23).Seems like this function needs to look for the presence of
operation.input
before callingdeserialize
, or else filter by the operation method if it is a stable API.The text was updated successfully, but these errors were encountered: