Skip to content

Commit

Permalink
fix: use apply instead of call when invoking the 'on' callback
Browse files Browse the repository at this point in the history
  • Loading branch information
dadu109 committed Sep 1, 2023
1 parent 514c873 commit c0bb65a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web/src/SplunkSocketIoClientInstrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class SplunkSocketIoClientInstrumentation extends InstrumentationBase {
});

try {
listener.call(this, args);
listener.apply(this, args);
} catch (error) {
if (error instanceof Error) {
span.recordException(error);
Expand Down

0 comments on commit c0bb65a

Please sign in to comment.