summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/core.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index 5f9e172d..6d0a5f0e 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -318,10 +318,10 @@ const yomichan = (() => {
}
getTemporaryListenerResult(eventHandler, userCallback, timeout=null) {
- if (
- typeof eventHandler.addListener === 'undefined' ||
- typeof eventHandler.removeListener === 'undefined'
- ) {
+ if (!(
+ typeof eventHandler.addListener === 'function' ||
+ typeof eventHandler.removeListener === 'function'
+ )) {
throw new Error('Event handler type not supported');
}