fix(pdf): fix Lexical AST text extraction to prevent [object Object] in datasheets
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Successful in 1m11s
Build & Deploy / 🏗️ Build (push) Successful in 2m17s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m14s
Build & Deploy / 🔔 Notify (push) Successful in 3s
Nightly QA / 💨 Smoke & Health (push) Successful in 1m9s

This commit is contained in:
2026-08-19 11:07:22 +02:00
parent ae381442aa
commit d5dba2be17
99 changed files with 39424 additions and 9 deletions

View File

@@ -1444,7 +1444,13 @@ export function buildDatasheetModel(args: {
}): DatasheetModel {
const labels = getLabels(args.locale);
const categoriesLine = (args.product.categories || []).map((c) => stripHtml(c.name)).join(' • ');
const descriptionText = stripHtml(args.product.applicationHtml || '');
let descriptionText = stripHtml(
args.product.applicationHtml || args.product.descriptionHtml || '',
);
if (descriptionText === '[object Object]') {
descriptionText = stripHtml(args.product.descriptionHtml || '');
if (descriptionText === '[object Object]') descriptionText = '';
}
const heroSrc = resolveMediaToLocalPath(
args.product.featuredImage || args.product.images?.[0] || null,
);