From fd5ff9ac8fa50f150476fd40a6087e0362d7f288 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 6 Apr 2021 15:40:24 +0200 Subject: [PATCH] Update form.js --- public/scripts/services/form.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/scripts/services/form.js b/public/scripts/services/form.js index 636c07b36..b02fc1363 100644 --- a/public/scripts/services/form.js +++ b/public/scripts/services/form.js @@ -4,6 +4,10 @@ window.ls.container.set('form', function () { function cast(value, to) { + if (value && Array.isArray(value) && to !== 'array') { + value = value.map(element => cast(element, to)); + return value; + } switch (to) { case 'int': case 'integer': @@ -118,4 +122,4 @@ } }, true, false); -})(window); \ No newline at end of file +})(window);