Skip to content

Commit 31d2ad8

Browse files
committed
Fix subscription callbacks when unsubscribe
Fix subscription _callbacks array is re-assign when unsubscribe in AuthorizeService.js in React template
1 parent a1fea20 commit 31d2ad8

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)