Skip to content

Commit

Permalink
[BUGFIX]: Fixing 'options' shadowing (#4)
Browse files Browse the repository at this point in the history
Closes #3
  • Loading branch information
alexander-alvarez authored and offirgolan committed Jul 20, 2017
1 parent ca33fc4 commit fd00043
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/mixins/copyable.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default Ember.Mixin.create({
copies[guid] = model;

// Copy all the attributes
this.eachAttribute((name, { type, options }) => {
this.eachAttribute((name, { type, options: attributeOptions }) => {
if (ignoreAttributes.includes(name)) {
return;
} else if (!isUndefined(overwrite[name])) {
Expand All @@ -141,8 +141,8 @@ export default Ember.Mixin.create({

// Run the transform on the value. This should guarantee that we get
// a new instance.
value = transform.serialize(value, options);
value = transform.deserialize(value, options);
value = transform.serialize(value, attributeOptions);
value = transform.deserialize(value, attributeOptions);

attrs[name] = value;
} else {
Expand Down

0 comments on commit fd00043

Please sign in to comment.