diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index cc4b05a974..6cc6fe24ae 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -1494,10 +1494,11 @@ export async function start(): Promise { // Set up event handling initEvents(); - const workflow = await Db.collections.Workflow.findOne({ + void Db.collections.Workflow.findOne({ select: ['createdAt'], order: { createdAt: 'ASC' }, where: {}, - }); - await InternalHooksManager.getInstance().onServerStarted(diagnosticInfo, workflow?.createdAt); + }).then(async (workflow) => + InternalHooksManager.getInstance().onServerStarted(diagnosticInfo, workflow?.createdAt), + ); }