lirown / graphql-custom-directive

A custom directive for GraphQL which hooks the query or schema execution
MIT License
53 stars 8 forks source link

(fatal node.js error) fields.hasOwnProperty is not a function #1

Closed krabbypattified closed 6 years ago

krabbypattified commented 6 years ago

I think it has something to do with this: https://stackoverflow.com/questions/16585209/node-js-object-object-has-no-method-hasownproperty

krabbypattified commented 6 years ago

So the fix would be to change index.js line 99 to Object.prototype.hasOwnProperty.call(fields, label)

lirown commented 6 years ago

fixed in 0.2.0