summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend-api-sender.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-11-25 14:19:18 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-11-26 22:06:27 -0500
commit0aed27b66d9c496e4cd57ef95d982c4e634a8666 (patch)
treee73353f53b028c211fe38043bd12a3a520daa9c1 /ext/fg/js/frontend-api-sender.js
parent663667306ce7ddcfeb603191dcd4a0f133f08b37 (diff)
Replace hasOwnProperty with simplified hasOwn function
Diffstat (limited to 'ext/fg/js/frontend-api-sender.js')
-rw-r--r--ext/fg/js/frontend-api-sender.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fg/js/frontend-api-sender.js b/ext/fg/js/frontend-api-sender.js
index c6eeaeb2..af998a8f 100644
--- a/ext/fg/js/frontend-api-sender.js
+++ b/ext/fg/js/frontend-api-sender.js
@@ -78,7 +78,7 @@ class FrontendApiSender {
}
onAck(id) {
- if (!this.callbacks.hasOwnProperty(id)) {
+ if (!hasOwn(this.callbacks, id)) {
console.warn(`ID ${id} not found for ack`);
return;
}
@@ -95,7 +95,7 @@ class FrontendApiSender {
}
onResult(id, data) {
- if (!this.callbacks.hasOwnProperty(id)) {
+ if (!hasOwn(this.callbacks, id)) {
console.warn(`ID ${id} not found`);
return;
}
@@ -118,7 +118,7 @@ class FrontendApiSender {
}
onError(id, reason) {
- if (!this.callbacks.hasOwnProperty(id)) { return; }
+ if (!hasOwn(this.callbacks, id)) { return; }
const info = this.callbacks[id];
delete this.callbacks[id];
info.timer = null;