Fix get_property.
This was returning the error when a token was not an atom whereas we only wanted to check to see if it was the atom nil.
This commit is contained in:
parent
5c929ffc13
commit
d53b9e1e1f
@ -184,11 +184,8 @@ pub(crate) fn get_property<'b, 's, 'x>(
|
||||
.ok_or("Should have an attributes child.")?;
|
||||
let attributes_map = attributes_child.as_map()?;
|
||||
let prop = attributes_map.get(key).map(|token| *token);
|
||||
match prop
|
||||
.map(|token| token.as_atom())
|
||||
.map_or(Ok(None), |r| r.map(Some))?
|
||||
{
|
||||
Some("nil") => return Ok(None),
|
||||
match prop.map(|token| token.as_atom()) {
|
||||
Some(Ok("nil")) => return Ok(None),
|
||||
_ => {}
|
||||
};
|
||||
Ok(prop)
|
||||
|
Loading…
Reference in New Issue
Block a user