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

Fix type.match crasher #193

Merged

Conversation

patocallaghan
Copy link
Collaborator

Ember Data allows you to do: name: DS.attr() without specifying a type for the attribute.

In some circumstances having no type set would cause your tests to crash on the following line: https://github.com/danielspaniel/ember-data-factory-guy/blob/master/addon/converter/fixture-converter.js#L32 because this.transformKeys was true but type was undefined.

if (!this.transformKeys || type.match('-mf')) {
  return this.noTransformFn;
}

Adding position: attr() caused the employee acceptance test to break. This fix makes it pass.

@danielspaniel danielspaniel merged commit 6e7b12a into adopted-ember-addons:master May 3, 2016
@danielspaniel
Copy link
Collaborator

good catch .. thanks for checking on that. :)

@patocallaghan patocallaghan deleted the patoc/no-type branch May 3, 2016 10:10
@patocallaghan
Copy link
Collaborator Author

no probs...updated this morning and came across it in one of my tests

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