Fix undefined access when loading stickers in chat
We need a check here, because stickers (and really, any images without a tempSource) will try to access an undefined object. This fixes the error: "qrc:/qt/qml/org/kde/neochat/timeline/ImageComponent.qml:106: TypeError: Cannot read property 'source' of undefined"
This commit is contained in:
@@ -103,7 +103,7 @@ Item {
|
|||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: visible ? (root?.mediaInfo.tempInfo.source ?? "") : ""
|
source: visible ? (root?.mediaInfo.tempInfo?.source ?? "") : ""
|
||||||
visible: _private.imageItem && _private.imageItem.status !== Image.Ready && !_private.hideImage
|
visible: _private.imageItem && _private.imageItem.status !== Image.Ready && !_private.hideImage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user