From 7b0d7139066a4dca534cee6a901e0b4e5988d3bf Mon Sep 17 00:00:00 2001 From: Seth Trowbridge Date: Sun, 14 May 2023 09:05:19 -0400 Subject: [PATCH] fix meta-merging logic oops :( --- example/deno.jsonc | 3 ++- lib/iso.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/example/deno.jsonc b/example/deno.jsonc index e191d55..f94b877 100644 --- a/example/deno.jsonc +++ b/example/deno.jsonc @@ -7,6 +7,7 @@ "@eno/iso": "http://localhost:4507/lib/iso.tsx" }, "tasks": { - "dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx --dev" + "dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx --dev", + "run": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx" } } \ No newline at end of file diff --git a/lib/iso.tsx b/lib/iso.tsx index e4cf49c..c27caf8 100644 --- a/lib/iso.tsx +++ b/lib/iso.tsx @@ -48,13 +48,14 @@ export const Meta = const lookup = key as MetaKeys const valPrev = final[lookup]; const valCurr = curr[lookup]; - if(valPrev && valCurr && curr.concatListed) + + if(valPrev && !valCurr) { - final[lookup] = valPrev + curr.concatListed + valCurr; + final[lookup] = curr.dropUnlisted ? "" : valPrev; } - else if(!valCurr && curr.dropUnlisted) + else if(valPrev && valCurr) { - final[lookup] = ""; + final[lookup] = curr.concatListed ? valPrev + curr.concatListed + valCurr : valCurr } else {