Skip to content

Commit

Permalink
fix: use declaration order when generating manifest (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas authored Mar 3, 2022
1 parent 8aff828 commit f3b6405
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const generateManifest = ({
declarations = [],
handlers,
}: GenerateManifestOptions) => {
const handlersWithRoutes = handlers.map((handler) => {
const declaration = declarations.find((candidate) => candidate.handler === handler.name)
const handlersWithRoutes = declarations.map((declaration) => {
const handler = handlers.find(({ name }) => declaration.handler === name)

if (declaration === undefined) {
if (handler === undefined) {
return
}

Expand Down

0 comments on commit f3b6405

Please sign in to comment.