summaryrefslogtreecommitdiff
path: root/ext/bg/js/api.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/bg/js/api.js
parent663667306ce7ddcfeb603191dcd4a0f133f08b37 (diff)
Replace hasOwnProperty with simplified hasOwn function
Diffstat (limited to 'ext/bg/js/api.js')
-rw-r--r--ext/bg/js/api.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 766fb0ed..12257e92 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -45,7 +45,7 @@ async function apiOptionsSet(changedOptions, optionsContext, source) {
function modifyOption(path, value, options) {
let pivot = options;
for (const key of path.slice(0, -1)) {
- if (!pivot.hasOwnProperty(key)) {
+ if (!hasOwn(pivot, key)) {
return false;
}
pivot = pivot[key];
@@ -236,7 +236,7 @@ async function apiTemplateRender(template, data, dynamic) {
async function apiCommandExec(command, params) {
const handlers = apiCommandExec.handlers;
- if (handlers.hasOwnProperty(command)) {
+ if (hasOwn(handlers, command)) {
const handler = handlers[command];
handler(params);
}