Fix multi option select handling of default value being hardcoded to a string
This commit is contained in:
parent
c9cc3d5aba
commit
0634d2fa5f
|
@ -11,6 +11,10 @@
|
|||
$: sanitiseOptions(options)
|
||||
|
||||
function getValidOptions(selectedOptions, allOptions) {
|
||||
// Fix the hardcoded default string value
|
||||
if (!Array.isArray(selectedOptions)) {
|
||||
selectedOptions = []
|
||||
}
|
||||
return selectedOptions.filter(val => allOptions.indexOf(val) !== -1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue