From 952f1f3e603740eb724ab27919ca83b2ce804474 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 7 Dec 2015 15:14:49 +0100 Subject: ensure multiselect always receives an array when setting its value, fixes #18734 --- apps/user_ldap/js/wizard/wizardTabGeneric.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/user_ldap') diff --git a/apps/user_ldap/js/wizard/wizardTabGeneric.js b/apps/user_ldap/js/wizard/wizardTabGeneric.js index 60e7cd2ad9e..8940a8468a0 100644 --- a/apps/user_ldap/js/wizard/wizardTabGeneric.js +++ b/apps/user_ldap/js/wizard/wizardTabGeneric.js @@ -198,9 +198,13 @@ OCA = OCA || {}; return; } - // deal with text area + // special cases: deal with text area and multiselect if ($element.is('textarea') && $.isArray(value)) { value = value.join("\n"); + } else if($element.hasClass(this.multiSelectPluginClass)) { + if(!_.isArray(value)) { + value = value.split("\n"); + } } if ($element.is('span')) { -- cgit v1.2.3