Skip to content

Commit

Permalink
Remove Promise.await missing
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Jan 23, 2024
1 parent 731e2da commit ad60329
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class DirectReplyIMAPInterceptor extends IMAPInterceptor {

super(imapConfig, options);

this.on('email', (email) => Promise.await(processDirectEmail(email)));
this.on('email', (email) => processDirectEmail(email));
}
}

Expand Down
7 changes: 4 additions & 3 deletions apps/meteor/server/lib/onStartup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ let hasStarted = false;

export const onStartup = (cb: StartupCallback): void => {
if (hasStarted) {
return Promise.await(cb());
void cb();
return;
}

callbackList.push(cb);
Expand All @@ -19,7 +20,7 @@ const runCallbacks = async (): Promise<void> => {
callbackList.splice(0, callbackList.length);
};

Meteor.startup(() => {
Meteor.startup(async () => {
hasStarted = true;
Promise.await(runCallbacks());
await runCallbacks();
});

0 comments on commit ad60329

Please sign in to comment.