aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-api-receiver.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frontend-api-receiver.js')
-rw-r--r--ext/fg/js/frontend-api-receiver.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fg/js/frontend-api-receiver.js b/ext/fg/js/frontend-api-receiver.js
index fbfb3ab0..7d38ddd5 100644
--- a/ext/fg/js/frontend-api-receiver.js
+++ b/ext/fg/js/frontend-api-receiver.js
@@ -34,7 +34,7 @@ class FrontendApiReceiver {
onMessage(port, {id, action, params, target, senderId}) {
if (
target !== this.source ||
- !this.handlers.hasOwnProperty(action)
+ !hasOwn(this.handlers, action)
) {
return;
}
@@ -43,10 +43,10 @@ class FrontendApiReceiver {
const handler = this.handlers[action];
handler(params).then(
- result => {
+ (result) => {
this.sendResult(port, id, senderId, {result});
},
- error => {
+ (error) => {
this.sendResult(port, id, senderId, {error: errorToJson(error)});
});
}