Skip to content

Commit eab3d6c

Browse files
authored
Merge pull request #526 from kcirtaptrick/use-params/in-operator
Fix #519: Support `in` operator for useParams()
2 parents 5938d10 + bd89541 commit eab3d6c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/nice-oranges-mate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": patch
3+
---
4+
5+
Support `in` operator for useParams()

src/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ export function createMemoObject<T extends Record<string | symbol, unknown>>(fn:
158158
},
159159
ownKeys() {
160160
return Reflect.ownKeys(fn());
161+
},
162+
has(_, property) {
163+
return property in fn();
161164
}
162165
});
163166
}

0 commit comments

Comments
 (0)