-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
console.log(require.cache) fails when koa is present #837
Comments
I've been chasing down multiple angles at this and I can't seem to get my finger on whats going on. |
Found the culprit
When require.cache is called with console.log there is a lot of formatting that is done and apparently if a module exports an inspect property they will use that for the formatting. So if this corner case is important than the exported value shoule either not be an object (which is why changing it to a class worked), or change the name of inspect to something different. |
this was discussed before, and while I can't remember the exact issue we decided this is a node problem and we want to keep our inspect property |
I don't think we discussed this exact question before, but we probably did discuss Since this is more builtin to Node and doesn't involve rebinding functions manually I'm more inclined to support it. |
Well if #605 happens (changing from a shared object to a class) then this error will be gone as well. |
Learn something everyday, fixed. |
* Fix context.inspect when called on the prototype Fixes #837 * Add tests
will fail because of the custom
inspect
implementation incontext.js
, which uses the customtoJSON
, which relies on a properly setthis
, which is not the case.not very important. But noteworthy - I guess
At least is costed me some time to figure it out.
The text was updated successfully, but these errors were encountered: