From 9578a49a1c1531f2e1ff17dc21ebf37b6b492753 Mon Sep 17 00:00:00 2001 From: mbaranturkmen Date: Sat, 19 Aug 2023 08:17:20 +0100 Subject: [PATCH] fix: add another if statement to check if content is empty --- packages/main-library/src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/main-library/src/index.ts b/packages/main-library/src/index.ts index e272941..01cd002 100644 --- a/packages/main-library/src/index.ts +++ b/packages/main-library/src/index.ts @@ -38,6 +38,10 @@ export { utils, WorkBook, WorkSheet } export const getContentProperty = (content: IContent, property: string): string | number | boolean | Date | IContent => { const accessContentProperties = (content: IContent, properties: string[]): string | number | boolean | Date | IContent => { + if (!content) { + return "" + } + const value = content[properties[0]] if (properties.length === 1) {