Fix attachment description observation trying to access properties of deleted object
This commit is contained in:
parent
2249e5a315
commit
40197e04cf
|
@ -23,7 +23,10 @@ class AttachmentRowController: ViewController {
|
|||
self.attachment = attachment
|
||||
|
||||
descriptionObservation = attachment.observe(\.attachmentDescription, changeHandler: { [unowned self] _, _ in
|
||||
self.updateAttachmentDescriptionState()
|
||||
// the faultingState is non-zero for objects that are being cascade deleted when the draft is deleted
|
||||
if attachment.faultingState == 0 {
|
||||
self.updateAttachmentDescriptionState()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue