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(); } }); }