Skip to content

Commit 775d47c

Browse files
authored
Update subscribe-to-list-notifications.md
Update `createListSubscription` to correctly initialize `this._listSubscription` from returned promise object.
1 parent fb1001c commit 775d47c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/spfx/subscribe-to-list-notifications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export default class LatestDocumentsWebPart extends BaseClientSideWebPart<ILates
3232
private _listSubscriptionFactory: ListSubscriptionFactory;
3333
private _listSubscription: IListSubscription;
3434

35-
private createListSubscription(): void {
35+
private async createListSubscription(): Promise<void> {
3636
this._listSubscriptionFactory = new ListSubscriptionFactory(this);
37-
this._listSubscription = this._listSubscriptionFactory.createSubscription({
37+
this._listSubscription = await this._listSubscriptionFactory.createSubscription({
3838
listId: Guid.parse(this.properties.listId),
3939
callbacks: {
4040
notification: this._loadDocuments.bind(this)

0 commit comments

Comments
 (0)