Skip to content

Commit

Permalink
fix: pass through native methods in "nested" proxy (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnusG committed Jan 31, 2022
1 parent a2a343c commit b758c74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-spoons-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'twind': patch
---

fix: native methods such as `bind` not working properly when used on twind's apply helper
2 changes: 2 additions & 0 deletions packages/twind/src/nested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ function nested(marker: string): Nested {
} as Nested,
{
get(target, name) {
if (name in nested$) return Reflect.get(nested$, name);

return function namedNested(
strings: TemplateStringsArray | Class,
...interpolations: Class[]
Expand Down

0 comments on commit b758c74

Please sign in to comment.