Use getter
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export class FeaturesRouter extends PromiseRouter {
|
||||
from: false,
|
||||
},
|
||||
push: {
|
||||
immediatePush: req.config.pushController.pushIsAvailable(),
|
||||
immediatePush: req.config.pushController.pushIsAvailable,
|
||||
scheduledPush: false,
|
||||
storedPushData: false,
|
||||
pushAudiences: false,
|
||||
|
||||
Reference in New Issue
Block a user