Skip to content

Loading…

PageOrQuery as null is still an object, yo #67

Closed
CodeOtter opened this Issue · 0 comments

1 participant

@CodeOtter

Line 96 in lib/client.js

https://github.com/pksunkara/octonode/blob/master/lib/octonode/client.js#L96

if (typeof pageOrQuery === 'object') {

Should be

if (typeof pageOrQuery === 'object' && pageOrQuery !== null) {

Null is technically an object, so if pageOrQuery isn't specified, the code will try to assign an access_token property to a null object, which ends the universe.

@pksunkara pksunkara added a commit that closed this issue
@pksunkara Fixes #67 a5f8afa
@pksunkara pksunkara closed this in a5f8afa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.