fix(BaseManager): BaseManager#valueOf should return cache (#3776)

* BaseManager#valueOf should return cache

* Update Util#flatten to handle valueOf being a Collection

* Update Util.js - typo

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
This commit is contained in:
Ryan Munro
2020-02-13 08:26:17 +11:00
committed by GitHub
parent 592021df92
commit 62b227c2bd
2 changed files with 7 additions and 1 deletions

View File

@@ -72,6 +72,10 @@ class BaseManager {
if (typeof idOrInstance === 'string') return idOrInstance;
return null;
}
valueOf() {
return this.cache;
}
}
module.exports = BaseManager;