From ecf37ca82bf3621cd32d885c07f7d42989550782 Mon Sep 17 00:00:00 2001 From: James Forbes Date: Thu, 29 Feb 2024 13:31:33 +0000 Subject: [PATCH] Fix mutation --- lib/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 0dd7ceb..b8356de 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -251,8 +251,7 @@ export function type( for (const [tag, of] of Object.entries(routes)) { api[tag] = (value:any = {}) => { - value.rest = normalizeRest(value.rest) - return { type, tag, value } + return { type, tag, value: { ...value, rest: normalizeRest(value.rest) } } }; const res = of({});