From 3887dd905ed2e8376694767a044d8c2e7c04bef3 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 2 Feb 2020 20:43:34 +0100 Subject: [PATCH] fix special duplication --- Views/FormView.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Views/FormView.js b/Views/FormView.js index d908417..a42a363 100644 --- a/Views/FormView.js +++ b/Views/FormView.js @@ -309,6 +309,7 @@ export class FormView specialExt = document.querySelectorAll('[data-form=' + this.id + '] [data-name]'), inputLength = inputs.length, externalLength = external.length; + specialLength = specialExt.length; for (let i = 0; i < inputLength; ++i) { if ((inputs[i].type === 'checkbox' || inputs[i].type === 'radio') && !inputs[i].checked) { @@ -327,6 +328,13 @@ export class FormView } } + for (let i = 0; i < specialLength; ++i) { + if (form.contains(specialExt[i])) { + delete specialExt[i]; + continue; + } + } + return Array.prototype.slice.call(inputs).concat( Array.prototype.slice.call(selects), Array.prototype.slice.call(textareas),