Skip to content

Commit cabf02b

Browse files
committed
WIP
1 parent 712db7f commit cabf02b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sources/IntrospectionView.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,13 @@ final class IntrospectionPlatformViewController: PlatformViewController {
147147
self.id = id
148148
super.init(nibName: nil, bundle: nil)
149149
self.handler = { [weak self] in
150-
guard let self else {
151-
return
152-
}
150+
guard let self else { return }
153151

154152
// NB: .introspect makes no guarantees about the number of times its callback is invoked,
155153
// so the below is fair play to maximize compatibility and predictability
156154
handler?(self) // we call this eagerly as most customization can successfully happen without a thread hop
157-
DispatchQueue.main.async {
155+
DispatchQueue.main.async { [weak self] in
156+
guard let self else { return }
158157
handler?(self) // we also thread hop to cover the rest of the cases where the underlying UI component isn't quite ready for customization
159158
}
160159
}

0 commit comments

Comments
 (0)