-
-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client): Allow calling toString and valueOf on the proxy object (#…
…2510) Fixes #2509 When a hono client is instantiated in expo and then console.log(client) is called, an error is thrown: `TypeError: Cannot determine default value of object` This is because the hermes javascript engine expects `new String(val)` to always return a string. But the proxy object would return a ClientRequestImpl object instead. This commit makes a string / function returned in the cases where .toString() and .valueOf() is called on the function.name or function respectively. Also see facebook/hermes#205
- Loading branch information
Showing
3 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters