empty bracketed lists are not null

This commit is contained in:
ConnorSkees 2020-04-26 16:39:44 -04:00
parent ce833b7c03
commit fb7fac5a53
2 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,7 @@ impl Value {
Self::BinaryOp(..) | Self::Paren(..) | Self::UnaryOp(..) => {
self.clone().eval(span)?.is_null(span)
}
Self::List(v, ..) => Ok(v.iter().all(|f| f.is_null(span).unwrap())),
Self::List(v, _, Brackets::None) => Ok(v.iter().all(|f| f.is_null(span).unwrap())),
_ => Ok(false),
}
}

View File

@ -313,3 +313,4 @@ test!(
"a {\n color: length(zip((a, b, c)));\n}\n",
"a {\n color: 3;\n}\n"
);
test!(empty_bracketed_list, "a {\n empty: [];\n}\n");