tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.23k stars 85 forks source link

[Fix] Avoid `record.get_or` failing on field without definition #1946

Closed yannham closed 3 weeks ago

yannham commented 3 weeks ago

Closes #1945.

Perhaps surprisingly, std.record.get_or "a" true {a} would error out instead of returning true. This commit fixes it by only fetching the value from the record if the field is present AND it is defined.