fix(fournisseurs): résoudre les IRIs
This commit is contained in:
@@ -62,10 +62,12 @@ export function useProducts () {
|
||||
product.constructeurs,
|
||||
product.constructeur,
|
||||
)
|
||||
const hasConstructeurs =
|
||||
Array.isArray(product.constructeurs) && product.constructeurs.length > 0
|
||||
const hasResolvedConstructeurs =
|
||||
Array.isArray(product.constructeurs)
|
||||
&& product.constructeurs.length > 0
|
||||
&& product.constructeurs.every((item) => item && typeof item === 'object')
|
||||
|
||||
if (ids.length && !hasConstructeurs) {
|
||||
if (ids.length && !hasResolvedConstructeurs) {
|
||||
const resolved = await ensureConstructeurs(ids)
|
||||
if (resolved.length) {
|
||||
product.constructeurs = resolved
|
||||
|
||||
Reference in New Issue
Block a user