Skip to content

Commit 5776542

Browse files
hermanhojaviercn
authored andcommitted
[ApiAuth] Fix subscription callbacks when unsubscribe (#15194)
re-assigned the callback array to itself after running splice on it when a client unsubscribed from notifications.
1 parent c82a95e commit 5776542

File tree

1 file changed

+1
-1
lines changed
  • src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization

1 file changed

+1
-1
lines changed

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class AuthorizeService {
148148
throw new Error(`Found an invalid number of subscriptions ${subscriptionIndex.length}`);
149149
}
150150

151-
this._callbacks = this._callbacks.splice(subscriptionIndex[0].index, 1);
151+
this._callbacks.splice(subscriptionIndex[0].index, 1);
152152
}
153153

154154
notifySubscribers() {

0 commit comments

Comments
 (0)