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

Use hasOwnProperty from Object prototype (Node v6.x) #71

Merged
merged 1 commit into from
Aug 6, 2016
Merged

Use hasOwnProperty from Object prototype (Node v6.x) #71

merged 1 commit into from
Aug 6, 2016

Conversation

kashav
Copy link
Contributor

@kashav kashav commented Aug 6, 2016

Was running into an issue with hasOwnProperty:

TypeError: object.hasOwnProperty is not a function
    at cleanFieldNames (/.../node_modules/winston-mongodb/lib/helpers.js:41:17)
    at cleanFieldNames (/.../node_modules/winston-mongodb/lib/helpers.js:56:7)
    at cleanFieldNames (/.../node_modules/winston-mongodb/lib/helpers.js:56:7)
    at Object.exports.prepareMetaData (/.../node_modules/winston-mongodb/lib/helpers.js:18:5)
    at /.../node_modules/winston-mongodb/lib/winston-mongodb.js:263:28
    at Db.collection (/.../node_modules/mongodb/lib/db.js:449:20)
    at /.../node_modules/winston-mongodb/lib/winston-mongodb.js:253:16
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Seems to be caused by a change in Node v6:

Updated to use hasOwnProperty from the Object prototype object instead.

@yurijmikhalevich yurijmikhalevich merged commit 6183613 into winstonjs:master Aug 6, 2016
@yurijmikhalevich
Copy link
Member

Thank you for the fix.

@kashav
Copy link
Contributor Author

kashav commented Aug 6, 2016

Thanks for the quick merge + bump! 😄

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.

2 participants