From bd895417924cd808636223a025a93b2ffbf36955 Mon Sep 17 00:00:00 2001 From: Patrick Wang Date: Sun, 20 Apr 2025 23:40:34 -0700 Subject: [PATCH] Fix #519: Support `in` operator for useParams() --- .changeset/nice-oranges-mate.md | 5 +++++ src/utils.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/nice-oranges-mate.md diff --git a/.changeset/nice-oranges-mate.md b/.changeset/nice-oranges-mate.md new file mode 100644 index 00000000..09821507 --- /dev/null +++ b/.changeset/nice-oranges-mate.md @@ -0,0 +1,5 @@ +--- +"@solidjs/router": patch +--- + +Support `in` operator for useParams() diff --git a/src/utils.ts b/src/utils.ts index eb0c0b1c..d347fb2f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -158,6 +158,9 @@ export function createMemoObject>(fn: }, ownKeys() { return Reflect.ownKeys(fn()); + }, + has(_, property) { + return property in fn(); } }); }