ensure multiselect always receives an array when setting its value, fixes #18734
This commit is contained in:
parent
e44b164f40
commit
952f1f3e60
|
@ -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')) {
|
||||
|
|
Loading…
Reference in New Issue