Merge pull request #990 from gzzhanghao/index

[web] fix StoreView.index
This commit is contained in:
Maximilian Hils 2016-03-02 09:54:47 +01:00
commit 8089752cb2
2 changed files with 2 additions and 2 deletions

View File

@ -6318,7 +6318,7 @@ _lodash2.default.extend(StoreView.prototype, _events.EventEmitter.prototype, {
this.emit("recalculate");
},
index: function index(elem) {
return _lodash2.default.sortedIndex(this.list, elem, this.sortfun);
return _lodash2.default.sortedIndexBy(this.list, elem, this.sortfun);
},
add: function add(elem) {
if (this.filt(elem)) {

View File

@ -60,7 +60,7 @@ _.extend(StoreView.prototype, EventEmitter.prototype, {
this.emit("recalculate");
},
index: function (elem) {
return _.sortedIndex(this.list, elem, this.sortfun);
return _.sortedIndexBy(this.list, elem, this.sortfun);
},
add: function (elem) {
if (this.filt(elem)) {