Skip to content

Commit

Permalink
Merge fdae945 into b9af132
Browse files Browse the repository at this point in the history
  • Loading branch information
chuganzy authored Dec 10, 2021
2 parents b9af132 + fdae945 commit a432f2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/messaging/e2e/messaging.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('messaging()', function () {

describe('getInitialNotification', function () {
it('returns null when no initial notification', async function () {
should.equal(await firebase.messaging().getInitialNotification(), null);
should.strictEqual(await firebase.messaging().getInitialNotification(), null);
});
});

Expand Down
7 changes: 6 additions & 1 deletion packages/messaging/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ class FirebaseMessagingModule extends FirebaseModule {
}

getInitialNotification() {
return this.native.getInitialNotification();
return this.native.getInitialNotification().then(value => {
if (value) {
return value;
}
return null;
});
}

getIsHeadless() {
Expand Down

0 comments on commit a432f2b

Please sign in to comment.