diff options
Diffstat (limited to 'src/new_fields')
| -rw-r--r-- | src/new_fields/Doc.ts | 3 | ||||
| -rw-r--r-- | src/new_fields/RichTextField.ts | 1 | 
2 files changed, 3 insertions, 1 deletions
| diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index 543ee46cc..3a90824df 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -467,12 +467,13 @@ export namespace Doc {      export function MakeCopy(doc: Doc, copyProto: boolean = false): Doc {          const copy = new Doc;          Object.keys(doc).forEach(key => { -            const field = ProxyField.WithoutProxy(() => doc[key]);              if (key === "proto" && copyProto) { +                const field = doc[key];                  if (field instanceof Doc) {                      copy[key] = Doc.MakeCopy(field);                  }              } 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 89799b2af..dcd8658ab 100644 --- a/src/new_fields/RichTextField.ts +++ b/src/new_fields/RichTextField.ts @@ -15,6 +15,7 @@ export class RichTextField extends ObjectField {          this.Data = data;      } +        [Copy]() {          return new RichTextField(this.Data);      } | 
