diff --git a/packages/xo-collection/src/collection.js b/packages/xo-collection/src/collection.js index 45c17140a..bd3c82482 100644 --- a/packages/xo-collection/src/collection.js +++ b/packages/xo-collection/src/collection.js @@ -192,7 +192,7 @@ export default class Collection extends EventEmitter { throw new DuplicateIndex(name) } indexes[name] = index - this._indexedItems[name] = index.itemsByHash + this._indexedItems[name] = index.items } deleteIndex (name) { diff --git a/packages/xo-collection/src/index.js b/packages/xo-collection/src/index.js index 5fb4b9392..70ed04c9a 100644 --- a/packages/xo-collection/src/index.js +++ b/packages/xo-collection/src/index.js @@ -35,7 +35,7 @@ export default class Index { // ----------------------------------------------------------------- - get itemsByHash () { + get items () { return this._itemsByHash }