-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fails if undefined value is passed #8
Comments
I'd definitely vote for 1, that allows much more natural code in some places |
What about turning undefined and null values into the strings |
That to me seems much less useful. It's a very rare thing that I'd actually want the words "null" or "undefined" in my html output and in those cases I think I'd rather be explicit. But a function that maybe returns some markup or maybe returns nothing? I do that all the time! |
Merged this suggestion into 1.1.0: now |
The following code returns an error:
I think there are two ways of resolving this:
null
andundefined
values are treated as blank (e.g. yield<h1></h1>
)null
andundefined
values are treated as errors that should never be rendered, and an appropriate error message is thrownI think my preference goes out to option 1, as visual quirks in UI are generally non-critical; though perhaps there are good arguments for option 2 which is probably more correct.
The text was updated successfully, but these errors were encountered: