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

Fix typo in default generator dependent property resolution logic #1820

Merged
merged 1 commit into from Sep 3, 2015

Conversation

Projects
None yet
2 participants
@akagomez
Contributor

akagomez commented Jul 30, 2015

Default value generators that depend on other default value generated properties where not being resolved when the dependent property was read without the dot-syntax.

In other words, this worked:

define: {
  user: {
    firstName: 'Chris', 
    lastName: 'Gomez'
  },
  userFullName: {
    value: function () {
      return this.attr('user.firstName') + ' ' + this.attr('user.lastName');
    }
  }
}

But this didn't:

define: {
  firstName: 'Chris',
  lastName: 'Gomez',
  fullName: {
    value: function () {
      return this.attr('firstName') + ' ' + this.attr('lastName');
    }
  }
}

This PR fixes the typo that created the issue and expands on the existing dependent value generators test to include examples of reads without the dot-syntax.

Closes #1819

@daffl daffl added this to the 2.2.8 milestone Aug 6, 2015

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Sep 3, 2015

Contributor

Awesome!

Contributor

daffl commented Sep 3, 2015

Awesome!

daffl added a commit that referenced this pull request Sep 3, 2015

Merge pull request #1820 from bitovi/value-generator-getter-typo
Fix typo in default generator dependent property resolution logic

@daffl daffl merged commit c4389bd into master Sep 3, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@daffl daffl deleted the value-generator-getter-typo branch Sep 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment