diff --git a/src/composables/useOptions.js b/src/composables/useOptions.js index 87ae129..da8b003 100644 --- a/src/composables/useOptions.js +++ b/src/composables/useOptions.js @@ -634,9 +634,14 @@ export default function useOptions (props, context, dep) } // Transforming an plain arrays to an array of objects - uo = uo.map((val) => { - return typeof val === 'object' ? val : { [valueProp.value]: val, [trackBy.value[0]]: val, [label.value]: val} - }) + /* istanbul ignore else */ + if (uo && Array.isArray(uo)) { + uo = uo.map((val) => { + return typeof val === 'object' ? val : { [valueProp.value]: val, [trackBy.value[0]]: val, [label.value]: val} + }) + } else { + uo = [] + } return uo }