sahat / megaboilerplate

Handcrafted starter projects, optimized for simplicity and ease of use.
MIT License
3.83k stars 257 forks source link

Facebook error: profile.location.name of undefined #135

Closed ivanryzk closed 8 years ago

ivanryzk commented 8 years ago

Privet Sahat,

love this project!

just a small fix, similar to what you've done in some other files.

It fixes an unhandled error (TypeError: Cannot read property 'name' of undefined), which arises when a Facebook user's location is returned as undefined. This is always the case with the example "Mega Boilerplate" Facebook app. Looks like it's due to Facebook's Review Policy for the user_location permission.

Hope you find this useful. Ivan

sahat commented 8 years ago

Spasibo. Looks good. 👍