Fix Hierarchy is extends is not working second time

Fix Hierarchy is extends is not working second time

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2021-12-02 20:02:18 +07:00
parent 32d559a07b
commit 1dd945d7b3
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2

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) {