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:
parent
28ec2b361a
commit
c8b0f75ea1
@ -180,7 +180,7 @@ const maintainInlineStyles = (
|
||||
|
||||
// If enter was pressed (or the block was otherwise split) we must maintain
|
||||
// styles in the previous block as well
|
||||
if (lastChangeType === 'split-block') {
|
||||
if (lastChangeType === 'split-block' && contentState.getBlockBefore(blockKey) !== undefined) {
|
||||
const newPrevBlock = mapInlineStyles(
|
||||
contentState.getBlockBefore(blockKey)!,
|
||||
inlineStyleStrategies,
|
||||
|
Loading…
Reference in New Issue
Block a user