Hierarchies with unmatched settings terminate early
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
When hierarchies are present and a match fails, processing terminates. E.g., in
```js
let template = {
msg: '{{organization.name||My Community}}
{{organization.nonexistantproperty.sharedTheme.logo.small||https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data}}
{{organization.name||My Community}}',
}
var settings = {
organization: {
name: "myOrg"
}
};
let result = adlib(template, settings)
t.plan(1);
t.equal(result.msg, 'myOrg
https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data
myOrg');
t.end();
```
adlib produces
```js
myOrg
https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data
organization.name
```
--only the first `organization.name` is replaced.
If the defaults are removed,
```js
myOrg
{{organization.nonexistantproperty.sharedTheme.logo.small}}
myOrg
```
is produced as expected.
Contributor guide
Assessment
This issue has not been assessed yet.