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 second issue seems to relate to temple do blocks which may return nothing. I have this simple component, which worked fine on my previous version of Temple (0.14.0):
Rendering this component with this branch installed leads to this error:
If I update to this, it works fine, so maybe this one is WAI and I should avoid returning nothing from temple blocks.
defp unread_message_counter(assigns) do
temple do
if @count > 0 do
span class: "flex items-center justify-center
bg-blue-500 rounded-full font-medium h-5 px-2ml-auto
text-xs text-white"
do
@count
end
+++ else+++ span
end
end
end
The text was updated successfully, but these errors were encountered:
Thanks for opening – just to add a bit more context (which I should have thought to try in the first place), it looks like returning any string directly from a temple block triggers the issue:
end
+++ else+++ "TEST"
end
Wrapping the string in any Temple/HTML tag resolves the issue.
Verified the above works ok (without wrapping tag) on Temple v0.14.0.
Describe the bug
Reported by @evnp
#2
The second issue seems to relate to
temple do
blocks which may return nothing. I have this simple component, which worked fine on my previous version of Temple (0.14.0
):Rendering this component with this branch installed leads to this error:
If I update to this, it works fine, so maybe this one is WAI and I should avoid returning nothing from
temple
blocks.The text was updated successfully, but these errors were encountered: