Skip to content

Commit

Permalink
Prendre en compte le fait le le id n'est pas toujours id
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Lord committed May 15, 2014
1 parent 096438d commit a732a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion angular-activerecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ angular.module('ActiveRecord', []).factory('ActiveRecord', ['$http', '$q', '$par
if (entity === oldEntity) {
// Same object
return true;
} else if (entity.id && oldEntity.id && entity.id == oldEntity.id) {
} else if (entity[entity.$idAttribute] && oldEntity[entity.$idAttribute] && entity[entity.$idAttribute] == oldEntity[entity.$idAttribute]) {
// Standard says all entities have a unique attribute id (assuming they are the same type)
return true
} else if (entity.$id && oldEntity.$id && entity.$id == oldEntity.$id) {
Expand Down

0 comments on commit a732a83

Please sign in to comment.