Skip to content

Commit

Permalink
conditionally offload loader (#5512)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanbond committed Apr 23, 2024
1 parent 91170ef commit f603f34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ export default class Form extends Element {
this.element.appendChild(this.loader);
}
else if (this.loader) {
this.element.removeChild(this.loader);
if (this.element.contains(this.loader)) {
this.element.removeChild(this.loader);
}
this.loader = null;
}
}
Expand Down

0 comments on commit f603f34

Please sign in to comment.