From f3b640584d1e0d8b1f27f42a3b53b322f179b023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Bou=C3=A7as?= Date: Thu, 3 Mar 2022 09:32:48 +0000 Subject: [PATCH] fix: use declaration order when generating manifest (#2) --- src/manifest.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/manifest.ts b/src/manifest.ts index a28519c6..1289a6f1 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -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 }