Closed
Description
So, I'm not sure if I'm abusing the API or it is actually a bug, but here is the problematic setup:
- A view that takes some id
- The initializer of the view instantiates an observable object to act as the "item details" fetcher
- The body of the view is recalculated when the fetcher is done
now, the WebImage
takes a url
, which of course is invalid (empty) while the fetcher is working...
Something like:
WebImage(url: URL(string: observable.imageURL ?? ""))
which results in an empty image, even after the second pass of the body passes a valid image URL (verified in the debugger).
If instead of an empty URL I pass a static image URL, then everything works as expected:
WebImage(url: URL(string: observable.imageURL ?? "https://some_image_url"))
any ideas?