Skip to content

Commit c4a027d

Browse files
committed
chore(pusher-web): remove dead onError callback from PusherListener
SubscriptionConfig.onError was never set by any caller after handleError was removed from Pusher.tsx. Drop the interface field, private field, call site, and cleanup assignment to avoid misleading future readers.
1 parent c44e6dc commit c4a027d

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

packages/pluggableWidgets/pusher-web/src/utils/PusherListener.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export interface EventBinding {
1515
export interface SubscriptionConfig {
1616
channelName: string;
1717
eventBindings: EventBinding[];
18-
onError?: (error: Error) => void;
1918
}
2019

2120
export class PusherListener {
@@ -24,7 +23,6 @@ export class PusherListener {
2423
private currentChannelName: string | null = null;
2524
private eventHandlersMap: Map<string, () => void> = new Map();
2625
private globalCallback: ((eventName: string, data: unknown) => void) | null = null;
27-
private onError?: (error: Error) => void;
2826
private destroyed = false;
2927

3028
constructor(private config: PusherConfig) {
@@ -70,7 +68,6 @@ export class PusherListener {
7068
return;
7169
}
7270
console.error("[PusherListener] Subscription error:", error);
73-
this.onError?.(new Error(`Subscription error: ${String(error)}`));
7471
});
7572
}
7673

@@ -79,9 +76,6 @@ export class PusherListener {
7976
config.eventBindings.forEach(binding => {
8077
this.eventHandlersMap.set(binding.eventName, binding.onEvent);
8178
});
82-
83-
// Store error handler for reference
84-
this.onError = config.onError;
8579
}
8680

8781
/**
@@ -97,7 +91,6 @@ export class PusherListener {
9791
this.currentChannelName = null;
9892
this.globalCallback = null;
9993
this.eventHandlersMap.clear();
100-
this.onError = undefined;
10194
}
10295

10396
/**

0 commit comments

Comments
 (0)