I was working on the Facebook Request API and found that when I close the popup and don’t invite anyone I was getting an error that
<pre>Response was undefined</pre>
I initially tried to see if the variable was empty and that didn’t work. I stumbled upon this gem the typeof operator and this was magic. Now I can check to see if the response variable is an object and then run my callback function. If it is not an object I do nothing. Nice!
Flickr Gallery
Recent Comments
Kevin says,
use forward slashes rather than back slashes. You would format ...
yiannos says,
very helpfull hint...you saved me a lots of money......
Tony Garcia says,
Hey Kevin,
Just curious -- are you running CF9 in ...
Sami says,
Okay, im somewhat new to macs and I don't know ...
Aaron says,
I got to meet this guy too. Seemed too laid ...