From 5776542508742da6aba2916f4f6e79642741cd8c Mon Sep 17 00:00:00 2001 From: hermanho Date: Thu, 24 Oct 2019 17:14:09 +0800 Subject: [PATCH] [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. --- .../src/components/api-authorization/AuthorizeService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js index 87cfa82e86..4ca7bfc5c0 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/AuthorizeService.js @@ -148,7 +148,7 @@ export class AuthorizeService { throw new Error(`Found an invalid number of subscriptions ${subscriptionIndex.length}`); } - this._callbacks = this._callbacks.splice(subscriptionIndex[0].index, 1); + this._callbacks.splice(subscriptionIndex[0].index, 1); } notifySubscribers() {