Skip to content
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

Work around for property 'Symbol(Symbol.toPrimitive)' in Proxy #330

Closed
wants to merge 1 commit into from

Conversation

ChuanyuWang
Copy link
Contributor

When I am trying to migrate to higher version nodeJS, e.g. 6.9.1. I found below error coming from Proxy handler, which is caused by Symbol property. So I add another workaround to skip Symbol property during Proxy's get handler

TypeError: '[object Object]' returned for property 'Symbol(Symbol.toPrimitive)' of object '[object Object]' is not a function
    at exports.format (util.js:108:18)
    at Console.log (console.js:43:37)
    at Database.<anonymous> (C:\git\test\app2.js:33:13)
    at emitNone (events.js:86:13)
    at Database.emit (events.js:185:7)
    at C:\git\test\node_modules\mongojs\lib\database.js:35:14
    at connectCallback (C:\git\test\node_modules\mongodb\lib\mongo_client.js:426:5)
    at C:\git\test\node_modules\mongodb\lib\mongo_client.js:364:13
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

@ChuanyuWang
Copy link
Contributor Author

Close this one and pull another commit to fix the code style

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant