Skip to content

Commit

Permalink
Use _getItemId in setItemById
Browse files Browse the repository at this point in the history
  • Loading branch information
megheaiulian authored and nomego committed May 25, 2018
1 parent 2ccc31f commit 9738277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cosmoz-data-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
*/
setItemById(id, item) {
const index = this.items
.findIndex(item => item === id || item[this.idPath] === id);
.findIndex(item => this._getItemId(item) === id);

if (index < 0) {
console.warn('trying to replace an item that is not in the list', id, item);
Expand Down

0 comments on commit 9738277

Please sign in to comment.