Procházet zdrojové kódy

clean refs on cloned shape

Konstantinos Kaloutas před 2 roky
rodič
revize
cc3c0197da
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      tldraw/packages/core/src/lib/TLApi/TLApi.ts

+ 2 - 1
tldraw/packages/core/src/lib/TLApi/TLApi.ts

@@ -261,7 +261,8 @@ export class TLApi<S extends TLShape = TLShape, K extends TLEventMap = TLEventMa
     const clone = new ShapeClass({
       ...shape.serialized,
       id: uniqueId(),
-      type: shape.type,
+      nonce: Date.now(),
+      refs: [],
       label: '',
       point: point,
     })