1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-21 13:38:56 +02:00

MM-52722: Fixed error when accessing property on undefined

This commit is contained in:
srisri332 2023-12-18 09:58:21 +05:30
parent 28ec2b361a
commit c8b0f75ea1

View File

@ -180,7 +180,7 @@ const maintainInlineStyles = (
// If enter was pressed (or the block was otherwise split) we must maintain // If enter was pressed (or the block was otherwise split) we must maintain
// styles in the previous block as well // styles in the previous block as well
if (lastChangeType === 'split-block') { if (lastChangeType === 'split-block' && contentState.getBlockBefore(blockKey) !== undefined) {
const newPrevBlock = mapInlineStyles( const newPrevBlock = mapInlineStyles(
contentState.getBlockBefore(blockKey)!, contentState.getBlockBefore(blockKey)!,
inlineStyleStrategies, inlineStyleStrategies,