(options)
| 154 | } |
| 155 | |
| 156 | loadPerson (options) { |
| 157 | if (options == null) { options = {} } |
| 158 | if (options.success == null) { options.success = _.noop } |
| 159 | if (options.context == null) { options.context = options } |
| 160 | if (options.resp == null) { options.resp = null } |
| 161 | if (options.resp) { |
| 162 | const attrs = authUtils.parseGoogleJwtResponse(options.resp.credential) |
| 163 | this.trigger('load-person', attrs) |
| 164 | return options.success.bind(options.context)(attrs) |
| 165 | } else { |
| 166 | return console.error('gplus login failed', options) |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | renderButtons () { |
| 171 | if ((typeof gapi !== 'undefined' && gapi !== null ? gapi.plusone : undefined) == null) { return false } |
no test coverage detected