Skip to content

Commit

Permalink
fix(core): fix demo-app application not found error
Browse files Browse the repository at this point in the history
fix demo-app application not found error
  • Loading branch information
simeng-li committed May 13, 2024
1 parent 6fc6eaa commit 774f1ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/libraries/hook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ export const createHookLibrary = (queries: Queries) => {

// Fetch application detail if available
const { applicationId } = contextManager.metadata;
const application = applicationId ? await findApplicationById(applicationId) : null;
const application = applicationId
? await trySafe(async () => findApplicationById(applicationId))
: undefined;

// Filter hooks that match each events
const webhooks = contextManager.contextArray.flatMap(({ event, ...rest }) => {
Expand Down

0 comments on commit 774f1ae

Please sign in to comment.