diff options
Diffstat (limited to 'src/new_fields')
| -rw-r--r-- | src/new_fields/Doc.ts | 2 | ||||
| -rw-r--r-- | src/new_fields/RichTextField.ts | 1 | 
2 files changed, 2 insertions, 1 deletions
| diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index 1b3c8b0b0..f95df0ccb 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -510,12 +510,12 @@ export namespace Doc {      export function MakeCopy(doc: Doc, copyProto: boolean = false, copyProtoId?: string): Doc {          const copy = new Doc(copyProtoId, true);          Object.keys(doc).forEach(key => { -            const field = ProxyField.WithoutProxy(() => doc[key]);              if (key === "proto" && copyProto) {                  if (doc[key] instanceof Doc) {                      copy[key] = Doc.MakeCopy(doc[key]!, false);                  }              } else { +                const field = ProxyField.WithoutProxy(() => doc[key]);                  if (field instanceof RefField) {                      copy[key] = field;                  } else if (field instanceof ObjectField) { diff --git a/src/new_fields/RichTextField.ts b/src/new_fields/RichTextField.ts index 1b52e6f82..9af0d94ff 100644 --- a/src/new_fields/RichTextField.ts +++ b/src/new_fields/RichTextField.ts @@ -20,6 +20,7 @@ export class RichTextField extends ObjectField {          this.Data = data;      } +        [Copy]() {          return new RichTextField(this.Data);      } | 
