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
The text was updated successfully, but these errors were encountered:
c0bra
changed the title
Compiler warns of 'empty block' if {#await} has no immediate contents or {:catch} is not present
Compiler warns of "Empty block" if {#await} has no immediate contents or {:catch} is not present
Jan 16, 2019
The docs should also mention the possibility to just write {#await promise then users} since I'm not very fond of the empty block either (renders too fast in most cases anyway).
Edit: Is there a reason it is then othern than the promise chain? Sounds a bit strange to me. Could use as as well as in {#each promise as user} => {#await primise as user}
Looks like there already was an issue for the warning, #1716.
Agree that this short form should be documented though. (I actually wasn't aware it existed.) It's probably easiest to just document it as part of v3, even though it's existed for a while in v2.
Example REPL (v3)
These two scenarios both result in an "Empty block" warning in the console:
{#await ...}
{:catch ...}
not present or empty:The text was updated successfully, but these errors were encountered: