Skip to content

Commit

Permalink
Null check for gplus button
Browse files Browse the repository at this point in the history
  • Loading branch information
djds4rce committed May 25, 2015
1 parent 10406ae commit a5a5914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion angular-socialshare.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ angular.module('djds4rce.angular-socialshare', [])
googleButton.setAttribute('id', id);
element.innerHTML = '';
element.append(googleButton);
if (attr.class.indexOf('g-plusone') != -1) {
if (attr.class && attr.class.indexOf('g-plusone') != -1) {
window.gapi.plusone.render(id, attr);
} else {
window.gapi.plus.render(id, attr);
Expand Down

0 comments on commit a5a5914

Please sign in to comment.