Skip to content

Commit

Permalink
OneSignal.login now returns auseable Promise
Browse files Browse the repository at this point in the history
This function had a Promise for its return type but awaiting on it had
no effected before this commit.

Motivation for this change is to allow the developer to safely await
on login so follow up things like addEmail create the user with the
external_id correctly.
  • Loading branch information
jkasten2 committed Nov 14, 2023
1 parent 36b8b7b commit a99d2f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/onesignal/OneSignal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default class OneSignal {
);
}

LoginManager.login(externalId, jwtToken);
await LoginManager.login(externalId, jwtToken);
}

static async logout(): Promise<void> {
Expand Down

0 comments on commit a99d2f7

Please sign in to comment.