Skip to content

Commit 97d4d63

Browse files
committed
Fixed the TS bug.
1 parent 1d34824 commit 97d4d63

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Prototype/Conceptual/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ class Prototype {
3737
// вложенный объект должен указывать на клонированный объект, а не на
3838
// исходный объект. Для данного случая хорошо подойдёт оператор
3939
// расширения (spread).
40-
clone.circularReference = {
41-
...this.circularReference,
42-
prototype: { ...this },
43-
};
40+
clone.circularReference = new ComponentWithBackReference(clone);
4441

4542
return clone;
4643
}

0 commit comments

Comments
 (0)