Merge pull request #500 from hcengineering/fix-is-extends

Fix Hierarchy is extends is not working second time
This commit is contained in:
Andrey Sobolev 2021-12-02 21:17:39 +07:00 committed by GitHub
commit f7cfe46a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,7 @@ export class Hierarchy {
*/
private isExtends<T extends Doc>(extendsOrImplements: Ref<Interface<Doc>>[], from: Ref<Interface<T>>): boolean {
const result: Ref<Interface<Doc>>[] = []
const toVisit = extendsOrImplements
const toVisit = [...extendsOrImplements]
while (toVisit.length > 0) {
const ref = toVisit.shift() as Ref<Interface<Doc>>
if (ref === from) {