From a7f2fe7eeab6899439490eabfd73981c4f5752f0 Mon Sep 17 00:00:00 2001 From: marie flores Date: Wed, 13 Nov 2024 08:39:06 +0100 Subject: [PATCH] [frontend] fix content export pdf (#8976) --- .../common/stix_core_objects/StixCoreObjectContent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectContent.jsx b/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectContent.jsx index 3e6ca3ca3b68..7a7a8fcab68e 100644 --- a/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectContent.jsx +++ b/opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectContent.jsx @@ -420,7 +420,7 @@ class StixCoreObjectContentComponent extends Component { let htmlData = currentContent .replaceAll('id="undefined" ', '') .replaceAll(regex, ''); - if (currentFileId.endsWith('.md')) { + if (currentFileId && currentFileId.endsWith('.md')) { htmlData = renderToString(compiler(htmlData, { wrapper: null })); } const ret = htmlToPdfmake(htmlData, {