1
0
Fork 0
mirror of synced 2024-09-30 17:18:14 +13:00

Handle non-array values

This commit is contained in:
Mel O'Hagan 2022-08-05 14:53:41 +01:00
parent 29c0e07b7e
commit 61d46062b7

View file

@ -55,6 +55,9 @@
if (!values) {
return []
}
if (!Array.isArray(values)) {
values = [values]
}
return values.map(value => (typeof value === "object" ? value._id : value))
}