Skip to content

Commit

Permalink
Use helper method to simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
shepherd-l committed Sep 16, 2024
1 parent 3f6459a commit cae70e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/CoreModuleDirector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ export class CoreModuleDirector {
);
const { lastKnownPushToken } = await Database.getAppState();
if (lastKnownPushToken) {
const pushSubscriptions = this.getAllPushSubscriptionModels();
return Object.values(pushSubscriptions).find(
(subscription) => subscription.data.token === lastKnownPushToken,
return this.getSubscriptionOfTypeWithToken(
ModelName.Subscriptions,
lastKnownPushToken,
);
}
return undefined;
Expand Down

0 comments on commit cae70e1

Please sign in to comment.