Skip to content

Commit

Permalink
fix: make null not proxyable
Browse files Browse the repository at this point in the history
  • Loading branch information
hansottowirtz authored Jun 28, 2024
1 parent af75f35 commit 8163501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function isWrapped<T>(item: T): item is Wrapped<T> {
}

export function isProxyable(item: any) {
return typeof item === 'object' || typeof item === 'function'
return (item !== null && typeof item === 'object') || typeof item === 'function'
}

export function wrap<T extends object>(item: T, handler: ProxyHandler<T>, autoPassthrough: boolean = true): T {
Expand Down

0 comments on commit 8163501

Please sign in to comment.