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
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:
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user