-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make Object.prototype.toString.call() work
So when Node 6+ wants to do an Object.prototype.toString call, it first sends a query for a property (the GetToStringTag property, in particular). Autovivify didn't know how to deal with this query, so would bomb. This has the property getter just return if it's asked for a symbol. This lets v8 fall through to its own stringify routines, so an appropriate value is emitted ("[object AutoVivify]"). This also removes the explicit toString method as the existing fall-back one seems to work just fine. This fixes #1
- Loading branch information
Allen Luce
committed
Jun 2, 2016
1 parent
3b0e35d
commit 4400a99
Showing
2 changed files
with
9 additions
and
12 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