适配当数据为undefined是出现的crash

Signed-off-by: nobbo <gaoshang22@huawei.com>
This commit is contained in:
nobbo
2023-06-29 16:05:54 +08:00
parent 5f01dc443e
commit e2d8fdcdc1
@@ -320,7 +320,7 @@ export struct NoteItemComp {
.borderRadius(24)
.linearGradient({
direction: GradientDirection.Right,
colors: this.selectedNoteData.uuid == this.noteItem.uuid ? [[0xffcdae, 0.0], [0xFfece2, 1.0]] : [[0xffffff, 0.0], [0xffffff, 1.0]]
colors: this.selectedNoteData?.uuid == this.noteItem.uuid ? [[0xffcdae, 0.0], [0xFfece2, 1.0]] : [[0xffffff, 0.0], [0xffffff, 1.0]]
})
.onClick(() => {
if (this.search) {