We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a24f7d7 + 016d58e commit 09f5f2cCopy full SHA for 09f5f2c
src/decoder/ReferenceTracker.ts
@@ -149,8 +149,8 @@ export class ReferenceTracker {
149
}
150
151
removeCallback(refId: number, field: string | number, callback: Function) {
152
- const index = this.callbacks?.[refId]?.[field]?.indexOf(callback);
153
- if (index !== -1) {
+ const index: number | undefined = this.callbacks?.[refId]?.[field]?.indexOf(callback);
+ if (index !== undefined && index !== -1) {
154
spliceOne(this.callbacks[refId][field], index);
155
156
0 commit comments