Handle non-array values
This commit is contained in:
parent
29c0e07b7e
commit
61d46062b7
|
@ -55,6 +55,9 @@
|
|||
if (!values) {
|
||||
return []
|
||||
}
|
||||
if (!Array.isArray(values)) {
|
||||
values = [values]
|
||||
}
|
||||
return values.map(value => (typeof value === "object" ? value._id : value))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue