Skip to content

Commit

Permalink
fix: logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Aug 7, 2021
1 parent 41f064f commit 43d8e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/electron-ipc-proxy/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const registrations: { [channel: string]: ProxyServerHandler | null } = {};
export function registerProxy<T>(target: T, descriptor: ProxyDescriptor, transport: IpcMain = ipcMain): VoidFunction {
const { channel } = descriptor;

if (registrations[channel] !== null || registrations[channel] !== undefined) {
if (registrations[channel] !== null && registrations[channel] !== undefined) {
throw new IpcProxyError(`Proxy object has already been registered on channel ${channel}`);
}

Expand Down

0 comments on commit 43d8e49

Please sign in to comment.