Skip to content

Commit 77a5cb3

Browse files
authored
Merge pull request #923 from wordpress-mobile/issue/831-re-instante-style-null-check
Fix `parentStyle must not be null`
2 parents 2a2d435 + 6496473 commit 77a5cb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/plugins/CssUnderlinePlugin.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class CssUnderlinePlugin(
4545
if (hiddenSpan.TAG == SPAN_TAG) {
4646
val parentStyle = hiddenSpan.attributes.getValue(CssStyleFormatter.STYLE_ATTRIBUTE)
4747
val childStyle = calypsoUnderlineSpan.attributes.getValue(CssStyleFormatter.STYLE_ATTRIBUTE)
48-
hiddenSpan.attributes.setValue(CssStyleFormatter.STYLE_ATTRIBUTE, CssStyleFormatter.mergeStyleAttributes(parentStyle, childStyle))
48+
if (parentStyle != null && childStyle != null) {
49+
hiddenSpan.attributes.setValue(CssStyleFormatter.STYLE_ATTRIBUTE, CssStyleFormatter.mergeStyleAttributes(parentStyle, childStyle))
50+
}
4951

5052
// remove the extra child span
5153
spannable.removeSpan(calypsoUnderlineSpan)

0 commit comments

Comments
 (0)