Fixed rendering else blocks.
This commit is contained in:
parent
5760566be0
commit
9c414d4d06
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user