Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

PageOrQuery as null is still an object, yo #67

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

PageOrQuery as null is still an object, yo #67

CodeOtter opened this issue Nov 27, 2013 · 0 comments

Comments

@CodeOtter
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant