aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/mecab.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/mecab.js')
-rw-r--r--ext/bg/js/mecab.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/mecab.js b/ext/bg/js/mecab.js
index 246f8bba..62111f73 100644
--- a/ext/bg/js/mecab.js
+++ b/ext/bg/js/mecab.js
@@ -60,7 +60,7 @@ class Mecab {
}
onNativeMessage({sequence, data}) {
- if (this.listeners.hasOwnProperty(sequence)) {
+ if (hasOwn(this.listeners, sequence)) {
const {callback, timer} = this.listeners[sequence];
clearTimeout(timer);
callback(data);
@@ -81,7 +81,7 @@ class Mecab {
delete this.listeners[sequence];
reject(new Error(`Mecab invoke timed out in ${Mecab.timeout} ms`));
}, Mecab.timeout)
- }
+ };
this.port.postMessage({action, params, sequence});
});