From c543c76a214cfda1af02bc753b369c0e2146ccb2 Mon Sep 17 00:00:00 2001 From: seb Date: Thu, 8 Oct 2026 03:03:01 +0200 Subject: [PATCH] i --- src/services/companyImport.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/services/companyImport.js b/src/services/companyImport.js index abf8127..aa487c2 100644 --- a/src/services/companyImport.js +++ b/src/services/companyImport.js @@ -345,9 +345,13 @@ export async function executeCompanyImport({ // Update barcode if provided if (barcode) { - const currentEans = existingArticle.eans || []; - if (!currentEans.includes(barcode)) { - await store.article.setEansBySku(googleAuthId, sku, [...currentEans, barcode]); + try { + const currentEans = existingArticle.eans || []; + if (!currentEans.includes(barcode)) { + await store.article.setEansBySku(googleAuthId, sku, [...currentEans, barcode]); + } + } catch (eanErr) { + console.warn(`[Import] Could not set EAN for ${sku}:`, eanErr.message); } } @@ -374,7 +378,11 @@ export async function executeCompanyImport({ // Set barcode if present if (barcode) { - await store.article.setEansBySku(googleAuthId, sku, [barcode]); + try { + await store.article.setEansBySku(googleAuthId, sku, [barcode]); + } catch (eanErr) { + console.warn(`[Import] Could not set EAN for ${sku}:`, eanErr.message); + } } articlesImported++;