File tree Expand file tree Collapse file tree
packages/super-editor/src/extensions/run Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ export const calculateInlineRunPropertiesPlugin = (editor) =>
126126 const overrideKeysFromInlineProps = ( inlineProps ) => styleKeys . filter ( ( k ) => inlineProps && k in inlineProps ) ;
127127
128128 if ( segments . length === 1 ) {
129- if ( JSON . stringify ( runProperties ) === JSON . stringify ( runNode . attrs . runProperties ) ) return ;
129+ const hadInlineKeys =
130+ Array . isArray ( runNode . attrs ?. runPropertiesInlineKeys ) && runNode . attrs . runPropertiesInlineKeys . length > 0 ;
131+ if ( JSON . stringify ( runProperties ) === JSON . stringify ( runNode . attrs . runProperties ) && hadInlineKeys ) return ;
130132 const newInlineKeys = [ ...new Set ( [ ...existingInlineKeys , ...keysFromMarks ( segments [ 0 ] ) ] ) ] ;
131133 const newOverrideKeys = overrideKeysFromInlineProps ( runProperties ) ;
132134 tr . setNodeMarkup (
You can’t perform that action at this time.
0 commit comments