You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: change.newValue should never be `nil`, but when observing an optional property that's set to `nil`, then change.newValue is `nil` instead of `Optional(nil)`. This is the bug report for this: https://bugs.swift.org/browse/SR-6066
guardlet newValue = change.newValue else{return}
onChange(newValue)
This can be worked around with some funny casting:
let newValue = change.newValue ?? (nil as Any? as! Value)
onChange(newValue)
Then we can also observe optionals correctly.
Thanks to the awesome help of Jordan Rose of the Swift team for providing the workaround!
The text was updated successfully, but these errors were encountered:
app-architecture/Recordings-MVVM-C-less-rx/Recordings/PlayViewController.swift
Lines 6 to 8 in ee561c7
This can be worked around with some funny casting:
Then we can also observe optionals correctly.
Thanks to the awesome help of Jordan Rose of the Swift team for providing the workaround!
The text was updated successfully, but these errors were encountered: