aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-07 13:38:54 -0400
committerbobzel <zzzman@gmail.com>2024-10-07 13:38:54 -0400
commit3137f422a004adef82124989280b40852a033afe (patch)
tree1af5806f5c88dd97fff70167d33a326d0c5cd826 /src/fields/Doc.ts
parent34fdaf6f1405c59dbf18d03cc489a50715a7e4e9 (diff)
fixed card 'pile' function. lint fixes.
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 60cf8b321..4d256e8f2 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -110,7 +110,7 @@ export namespace Field {
export function Copy(field: unknown) {
return field instanceof ObjectField ? ObjectField.MakeCopy(field) : (field as FieldType);
}
- UndoManager.SetFieldPrinter(toString);
+ UndoManager.SetFieldPrinter((val: unknown) => (IsField(val) ? toString(val) : ''));
}
export type FieldType = number | string | boolean | ObjectField | RefField;
export type Opt<T> = T | undefined;
@@ -336,7 +336,6 @@ export class Doc extends RefField {
if (!id || forceSave) {
DocServer.CreateDocField(docProxy);
}
- // eslint-disable-next-line no-constructor-return
return docProxy; // need to return the proxy from the constructor so that all our added fields will get called
}
@@ -463,8 +462,6 @@ export class Doc extends RefField {
});
}
}
-
-// eslint-disable-next-line no-redeclare
export namespace Doc {
export let SelectOnLoad: Doc | undefined;
export function SetSelectOnLoad(doc: Doc | undefined) {
@@ -660,7 +657,6 @@ export namespace Doc {
if (reversed) list.splice(0, 0, doc);
else list.push(doc);
} else {
- // eslint-disable-next-line no-lonely-if
if (reversed) list.splice(before ? list.length - ind + 1 : list.length - ind, 0, doc);
else list.splice(before ? ind : ind + 1, 0, doc);
}
@@ -1192,7 +1188,6 @@ export namespace Doc {
return Cast(Doc.UserDoc().myLinkDatabase, Doc, null);
}
export function SetUserDoc(doc: Doc) {
- // eslint-disable-next-line no-return-assign
return (manager._user_doc = doc);
}