Skip to content

Commit 3395ce6

Browse files
committed
fix: parse text node for Hints across JS world with event target
1 parent b444312 commit 3395ce6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content_scripts/common/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function initSKFunctionListener(name, interfaces, capture) {
291291
let args = evt.detail;
292292
const fk = args.shift();
293293
if (capture) {
294-
if (args[0].constructor.name === "Array" && args[0][0] === "__EVENT_TARGET__") {
294+
if (args.length > 0 && args[0].constructor.name === "Array" && args[0][0] === "__EVENT_TARGET__") {
295295
// restore args from evt.target, see src/content_scripts/common/hints.js:442
296296
args[0][0] = evt.target;
297297
} else {

0 commit comments

Comments
 (0)