Use getter

This commit is contained in:
Drew Gross
2016-03-24 20:59:50 -07:00
parent ec35c39724
commit 7cdf85b367
2 changed files with 3 additions and 3 deletions

View File

@@ -34,13 +34,13 @@ export class PushController extends AdaptableController {
}
}
pushIsAvailable() {
get pushIsAvailable() {
return !!this.adapter;
}
sendPush(body = {}, where = {}, config, auth, wait) {
var pushAdapter = this.adapter;
if (!this.pushIsAvailable()) {
if (!this.pushIsAvailable) {
throw new Parse.Error(Parse.Error.PUSH_MISCONFIGURED,
'Push adapter is not available');
}