1
0
Fork 0
mirror of synced 2024-07-02 04:50:44 +12:00

Fix multi option select handling of default value being hardcoded to a string

This commit is contained in:
Andrew Kingston 2020-11-03 10:09:22 +00:00
parent 4f2079509c
commit bcc86af4b4

View file

@ -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)
}