criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 176 forks source link

Bug in Graph.prototype.end(body) (graph.js line 83) #7

Closed nitzo closed 12 years ago

nitzo commented 12 years ago

Hello,

When body is an object (try get 'me/picture') this function returns null. The reason for this is typeof(body === 'string) is a boolean since body==='string' and typeof(true) is boolean.

The statement needs to be:

var json = typeof body === 'string' ? null : body

Nitzan Bar

criso commented 12 years ago

Nice!