Skip to content

Commit 18baa7b

Browse files
authored
Merge pull request #7 from jsonapi-suite/allow_deleting_many_to_many
Return a copy of the array
2 parents c9a3825 + c5ea409 commit 18baa7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addon/mixins/model.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ export default Ember.Mixin.create({
7070
},
7171

7272
manyToManyMarkedForDeletion(relation) {
73-
return this.get('_manyToManyDeleted') &&
74-
this.get(`_manyToManyDeleted.${relation}`);
73+
const relationModels = this.get('_manyToManyDeleted') &&
74+
this.get(`_manyToManyDeleted.${relation}`);
75+
return relationModels && relationModels.toArray();
7576
},
7677

7778
unmarkManyToManyDeletion(relation, model) {

0 commit comments

Comments
 (0)