Fixed rendering else blocks.

This commit is contained in:
Tom Alexander 2020-05-05 20:32:30 -04:00
parent 5760566be0
commit 9c414d4d06
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -265,7 +265,10 @@ impl<'a> DustRenderer<'a> {
&'a self,
walk_result: Result<&'b dyn ContextElement, RenderError<'b>>,
) -> Result<Vec<&'b dyn ContextElement>, RenderError<'b>> {
if let Err(RenderError::WontWalk { .. }) = walk_result {
if let Err(RenderError::NotFound { .. }) = walk_result {
// If reference does not exist in the context, render the else block
Ok(vec![])
} else if let Err(RenderError::WontWalk { .. }) = walk_result {
// If reference does not exist in the context, render the else block
Ok(vec![])
} else if let Err(RenderError::CantWalk { .. }) = walk_result {