Skip to content

Commit

Permalink
fix: add another if statement to check if content is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
cjxe committed Aug 19, 2023
1 parent 1cae3cd commit 9578a49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/main-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9578a49

Please sign in to comment.