PageOrQuery as null is still an object, yo #67

Closed
CodeOtter opened this Issue Nov 27, 2013 · 0 comments

Comments

Projects
None yet
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment