You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that .inspect() is reserved by Node, akin to .toString(), and is called when you try to log an object that implements it, and for debugging. This has caused issues in the past.
Now clearly things like Networks and Containers aren't meant to be console.log'd, and renaming the inspect methods would break backwards compatibility, but thought I should let you know anyway, and if you decide to rename them is up to you.
The text was updated successfully, but these errors were encountered:
Alternatively, according to the docs, I believe you can also suppress this bug by adding a symbol-based inspect method to the classes, as that takes precedence, similar to this:
We were getting a weird crash at me-box/databox#4, and found the source after some sleuthing. To recreate:
It turns out that
.inspect()
is reserved by Node, akin to.toString()
, and is called when you try to log an object that implements it, and for debugging. This has caused issues in the past.Now clearly things like
Networks
andContainers
aren't meant to beconsole.log
'd, and renaming the inspect methods would break backwards compatibility, but thought I should let you know anyway, and if you decide to rename them is up to you.The text was updated successfully, but these errors were encountered: