Skip to content

Commit bd89541

Browse files
committed
Fix #519: Support in operator for useParams()
1 parent c05ce35 commit bd89541

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/nice-oranges-mate.md

+5
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

+3
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)