Skip to content

Commit fd00043

Browse files
alexander-alvarezoffirgolan
authored andcommitted
[BUGFIX]: Fixing 'options' shadowing (#4)
Closes #3
1 parent ca33fc4 commit fd00043

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

addon/mixins/copyable.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default Ember.Mixin.create({
126126
copies[guid] = model;
127127

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

142142
// Run the transform on the value. This should guarantee that we get
143143
// a new instance.
144-
value = transform.serialize(value, options);
145-
value = transform.deserialize(value, options);
144+
value = transform.serialize(value, attributeOptions);
145+
value = transform.deserialize(value, attributeOptions);
146146

147147
attrs[name] = value;
148148
} else {

0 commit comments

Comments
 (0)