From 3b1162f58fd854091fca515dfe9af942d2220108 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 25 Oct 2022 14:34:53 -0400 Subject: fixed up dragging fields from key value pane to support numbers --- src/fields/Doc.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/fields') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 460dd6081..466b43287 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -491,6 +491,9 @@ export namespace Doc { export function IsSystem(doc: Doc) { return GetT(doc, 'system', 'boolean', true); } + export function IsDelegateField(doc: Doc, fieldKey: string) { + return doc && Get(doc, fieldKey, true) !== undefined; + } 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; -- cgit v1.2.3-70-g09d2