Skip to content

Commit

Permalink
res and res.data need to exist first
Browse files Browse the repository at this point in the history
  • Loading branch information
timdream committed Jun 28, 2013
1 parent 0c354b8 commit ba88e80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/panels.js
Expand Up @@ -210,7 +210,8 @@ FacebookPanelView.prototype.updateStatus = function fbpv_updateStatus(res) {
this.facebookResponse = res;
if (this.facebookResponse.status === 'connected') {
FB.api('/me/permissions', (function checkPermissions(res) {
this.hasPermission = (res.data[0]['read_stream'] == 1);
this.hasPermission =
res && res.data && (res.data[0]['read_stream'] == 1);
this.updateUI();
}).bind(this));
} else {
Expand Down

0 comments on commit ba88e80

Please sign in to comment.