Skip to content

Commit db44be9

Browse files
committed
Do not crash when pasted text is null
1 parent f812c76 commit db44be9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
19041904
if (clip.itemCount > 0) {
19051905
val firstItem = clip.getItemAt(0)
19061906
val itemToPaste = when {
1907-
firstItem.text.isNotBlank() -> {
1907+
!firstItem.text.isNullOrEmpty() -> {
19081908
val textToPaste = if (asPlainText) clip.getItemAt(0).coerceToText(context).toString()
19091909
else clip.getItemAt(0).coerceToHtmlText(AztecParser(alignmentRendering, plugins))
19101910
IClipboardPastePlugin.PastedItem.HtmlText(textToPaste)

0 commit comments

Comments
 (0)