mirror of
https://github.com/rensbreur/SwiftTUI.git
synced 2026-04-03 00:18:31 -06:00
Conditional views with empty else clause crashes #41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hassila on 12/16/2022
Constructs like this crashes with a nil dereference:
adding an else clause returning a different view get's it working:
Seems conditional views can't handle the case of 'empty' - maybe 'EmptyView' could be exposed if an else clause is required?
(I don't want to use a Spacer) - need scope change:
'EmptyView' initializer is inaccessible due to 'internal' protection levelShould this work, or must a view always be returned in else? If so, could we consider exposing EmptyView ?