Skip to content

Commit

Permalink
Fix error checks
Browse files Browse the repository at this point in the history
Signed-off-by: Tsaqif <[email protected]>
  • Loading branch information
tsa321 committed Oct 2, 2024
1 parent 00322f6 commit bed7eea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/styles/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1252,10 +1252,10 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({
/*
* Returns the actual maxHeight of the auto-growing markdown text input.
*/
getMarkdownMaxHeight: (maxAutoGrowHeight) => {
getMarkdownMaxHeight: (maxAutoGrowHeight: number | undefined): TextStyle => {
// maxHeight is not of the input only but the of the whole input container
// which also includes the top padding and bottom border
return ({maxHeight: maxAutoGrowHeight - styles.textInputMultilineContainer.paddingTop - styles.textInputContainer.borderBottomWidth});
return maxAutoGrowHeight ? {maxHeight: maxAutoGrowHeight - styles.textInputMultilineContainer.paddingTop - styles.textInputContainer.borderBottomWidth} : {};
},

/**
Expand Down

0 comments on commit bed7eea

Please sign in to comment.