Fix isEdit Check MessageEditComponent

Stop the console being pinged with qrc:/org/kde/neochat/qml/MessageEditComponent.qml:158: TypeError: Cannot read property 'isEditing' of undefined.

Fixes network/neochat#629
This commit is contained in:
James Graham
2023-11-26 15:21:18 +00:00
parent 89b6c54f25
commit ab4639926a

View File

@@ -155,7 +155,7 @@ QQC2.TextArea {
onChatBarCacheChanged: documentHandler.chatBarCache = chatBarCache
function updateEditText() {
if (chatBarCache.isEditing && chatBarCache.relationMessage.length > 0) {
if (chatBarCache?.isEditing && chatBarCache.relationMessage.length > 0) {
root.text = chatBarCache.relationMessage
root.forceActiveFocus();
root.cursorPosition = root.length;