From 85f5f3824b8e815350f1f83c81a53cafd8a26b9e Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 26 Sep 2021 03:18:41 -0400 Subject: fixed bug with SetInPlace for fields starting with "_" --- src/fields/Doc.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/fields') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index d8690831f..61ad76412 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -345,6 +345,7 @@ export namespace Doc { return GetT(doc, "system", "boolean", true); } export async function SetInPlace(doc: Doc, key: string, value: Field | undefined, defaultProto: boolean) { + if (key.startsWith("_")) key = key.substring(1); const hasProto = doc.proto instanceof Doc; const onDeleg = Object.getOwnPropertyNames(doc).indexOf(key) !== -1; const onProto = hasProto && Object.getOwnPropertyNames(doc.proto).indexOf(key) !== -1; -- cgit v1.2.3-70-g09d2