summaryrefslogtreecommitdiff
path: root/ext/fg/js/float.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/float.js
parent663667306ce7ddcfeb603191dcd4a0f133f08b37 (diff)
Replace hasOwnProperty with simplified hasOwn function
Diffstat (limited to 'ext/fg/js/float.js')
-rw-r--r--ext/fg/js/float.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js
index 089c9422..ae54be00 100644
--- a/ext/fg/js/float.js
+++ b/ext/fg/js/float.js
@@ -49,7 +49,7 @@ class DisplayFloat extends Display {
onMessage(e) {
const {action, params} = e.data;
const handlers = DisplayFloat.messageHandlers;
- if (handlers.hasOwnProperty(action)) {
+ if (hasOwn(handlers, action)) {
const handler = handlers[action];
handler(this, params);
}
@@ -58,7 +58,7 @@ class DisplayFloat extends Display {
onKeyDown(e) {
const key = Display.getKeyFromEvent(e);
const handlers = DisplayFloat.onKeyDownHandlers;
- if (handlers.hasOwnProperty(key)) {
+ if (hasOwn(handlers, key)) {
const handler = handlers[key];
if (handler(this, e)) {
e.preventDefault();