Skip to content

Commit ed879f3

Browse files
authored
Merge pull request #56 from jsxtools/jon/remove-unused-block
Fix validity check in invoker activation
2 parents ce5cf45 + a845fb0 commit ed879f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

invoker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export function apply() {
317317
const source = event.target.closest("button[commandfor], button[command]");
318318
if (!source) return;
319319

320-
if (this.form && this.getAttribute("type") !== "button") {
320+
if (source.form && source.getAttribute("type") !== "button") {
321321
event.preventDefault();
322322
throw new Error(
323323
"Element with `commandFor` is a form participant. " +

0 commit comments

Comments
 (0)