From a99d2f7adccdc26094b593fc3e0e35a293889c98 Mon Sep 17 00:00:00 2001 From: Josh Kasten Date: Tue, 14 Nov 2023 02:04:08 +0000 Subject: [PATCH] OneSignal.login now returns auseable Promise 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. --- src/onesignal/OneSignal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onesignal/OneSignal.ts b/src/onesignal/OneSignal.ts index 1cd3eab9b..00ce1af29 100644 --- a/src/onesignal/OneSignal.ts +++ b/src/onesignal/OneSignal.ts @@ -126,7 +126,7 @@ export default class OneSignal { ); } - LoginManager.login(externalId, jwtToken); + await LoginManager.login(externalId, jwtToken); } static async logout(): Promise {