Do not add a fallback field reference if front side contains conditionals (#2859)
* Do not add a fallback field ref if front contains conditionals * Ensure field reference when there are only conditionals
This commit is contained in:
parent
987a46978b
commit
27b2bce604
@ -741,9 +741,9 @@ impl ParsedTemplate {
|
||||
}
|
||||
|
||||
pub(crate) fn contains_field_replacement(&self) -> bool {
|
||||
self.0
|
||||
.iter()
|
||||
.any(|node| matches!(node, ParsedNode::Replacement { key: _, filters: _ }))
|
||||
let mut set = HashSet::new();
|
||||
find_field_references(&self.0, &mut set, false, false);
|
||||
!set.is_empty()
|
||||
}
|
||||
|
||||
pub(crate) fn add_missing_field_replacement(&mut self, field_name: &str, is_cloze: bool) {
|
||||
|
Loading…
Reference in New Issue
Block a user