Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset isStaticValue for each variable #54

Merged
merged 2 commits into from
Oct 28, 2020

Conversation

MikeTschudi
Copy link
Member

#53

@MikeTschudi
Copy link
Member Author

@tomwayson, would you please review this PR?

Copy link
Member

@tomwayson tomwayson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm revoking my review and asking @dbouwman to review, merge, and release this since he's more familiar w/ the code and consequences of the changes.

@tomwayson tomwayson dismissed their stale review October 28, 2020 14:54

meant to be a comment

Copy link
Member

@dbouwman dbouwman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all existing tests pass... presumably this will not incur a breaking change...

@dbouwman dbouwman merged commit bb888d1 into Esri:master Oct 28, 2020
@MikeTschudi
Copy link
Member Author

And there's a new test that breaks without the modification:

test('Adlib::Hierarchies:: missing value with defaults does not stop processing', (t) => {
  let template = {
    msg: '{{organization.name||My Community}}<br />{{organization.nonexistantproperty.sharedTheme.logo.small||https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data}}<br />{{organization.name||My Community}}',
  }

  var settings = {
    organization: {
      name: "myOrg"
    }
  };

  let result = adlib(template, settings)

  t.plan(1);
  t.equal(result.msg, 'myOrg<br />https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data<br />myOrg');
  t.end();
})

@MikeTschudi MikeTschudi deleted the bug/add-missing-value-recovery branch October 28, 2020 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants