fix(Collection): use Symbol.species for creating derived collections (#2715)

This commit is contained in:
Alex Hîncu
2018-08-10 11:57:33 +03:00
committed by Crawl
parent 0a21280990
commit ce8a679a14
2 changed files with 9 additions and 4 deletions

View File

@@ -46,6 +46,10 @@ class DataStore extends Collection {
if (typeof idOrInstance === 'string') return idOrInstance;
return null;
}
static get [Symbol.species]() {
return Collection;
}
}
module.exports = DataStore;