From f603f3478123a5de5a660975e10f60e20103c613 Mon Sep 17 00:00:00 2001 From: Brendan Bond Date: Tue, 23 Apr 2024 10:35:35 -0500 Subject: [PATCH] conditionally offload loader (#5512) --- src/Form.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Form.js b/src/Form.js index 1b92c55de6..adce853a8c 100644 --- a/src/Form.js +++ b/src/Form.js @@ -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; } }