Use getter
This commit is contained in:
@@ -34,13 +34,13 @@ export class PushController extends AdaptableController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pushIsAvailable() {
|
get pushIsAvailable() {
|
||||||
return !!this.adapter;
|
return !!this.adapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPush(body = {}, where = {}, config, auth, wait) {
|
sendPush(body = {}, where = {}, config, auth, wait) {
|
||||||
var pushAdapter = this.adapter;
|
var pushAdapter = this.adapter;
|
||||||
if (!this.pushIsAvailable()) {
|
if (!this.pushIsAvailable) {
|
||||||
throw new Parse.Error(Parse.Error.PUSH_MISCONFIGURED,
|
throw new Parse.Error(Parse.Error.PUSH_MISCONFIGURED,
|
||||||
'Push adapter is not available');
|
'Push adapter is not available');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class FeaturesRouter extends PromiseRouter {
|
|||||||
from: false,
|
from: false,
|
||||||
},
|
},
|
||||||
push: {
|
push: {
|
||||||
immediatePush: req.config.pushController.pushIsAvailable(),
|
immediatePush: req.config.pushController.pushIsAvailable,
|
||||||
scheduledPush: false,
|
scheduledPush: false,
|
||||||
storedPushData: false,
|
storedPushData: false,
|
||||||
pushAudiences: false,
|
pushAudiences: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user