From 20b0b4b9b21b70811db9df14e89af26b84582721 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 26 Aug 2021 11:21:00 +0200 Subject: [PATCH] Fix type error in forms --- www/form/inner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/form/inner.js b/www/form/inner.js index c98a9f830..f440dd49a 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -1734,7 +1734,8 @@ define([ }, getCursor: function () { return cursorGetter(); }, setValue: function (val) { - var toSort = (val || []).map(function (val) { + if (!Array.isArray(val)) { val = []; } + var toSort = val.map(function (val) { return invMap[val]; }); sortable.sort(toSort);