Skip to content

Fix Table.hasColumn for columns with custom property names#322

Merged
brianc merged 1 commit into
brianc:masterfrom
madebyherzblut:master
Dec 20, 2016
Merged

Fix Table.hasColumn for columns with custom property names#322
brianc merged 1 commit into
brianc:masterfrom
madebyherzblut:master

Conversation

@madebyherzblut
Copy link
Copy Markdown
Contributor

There was a bug which caused Table.hasColumn to return false when passed a property name (defined via column.property) instead of a column name.

This now works and all tests pass:

test('hasColumn with user-defined column property', function() {
  var table = Table.define({
    name: 'blah',
    columns: [{
        name: 'id',
        property: 'theId'
    }, {name: 'foo'}]
  });

  assert.equal(table.hasColumn('id'), true);
  assert.equal(table.hasColumn('theId'), true);
});

There was a bug which caused Table.hasColumn to return false when passed a property name (defined via column.property) instead of a column name.
@brianc
Copy link
Copy Markdown
Owner

brianc commented Dec 20, 2016

Thanks a lot for your work on this! Sorry it took me a while to get to it - life got in the way & I got really busy tending to some things. I'll merge this now & push a new minor version to npm here in just a few minutes. ❤️

@brianc brianc merged commit f941c74 into brianc:master Dec 20, 2016
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.

2 participants