aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-02-16 00:50:23 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-02-16 00:50:23 -0500
commitf33ad290f1de3a01f2c4536f03f040e09771f82e (patch)
treee69ccddbfe5d7bacd70d30483903084e5fed2a3e /src/new_fields/Doc.ts
parent03b33592cf7f244094bb594c8251ab9c3e0ee48f (diff)
improved file upload api
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 55c0660c0..a722f552e 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -112,10 +112,10 @@ export class Doc extends RefField {
// getPrototypeOf: (target) => Cast(target[SelfProxy].proto, Doc) || null, // TODO this might be able to replace the proto logic in getter
has: (target, key) => key in target.__fields,
ownKeys: target => {
- let obj = {} as any;
+ const obj = {} as any;
Object.assign(obj, target.___fields);
runInAction(() => obj.__LAYOUT__ = target.__LAYOUT__);
- return Object.keys(obj)
+ return Object.keys(obj);
},
getOwnPropertyDescriptor: (target, prop) => {
if (prop.toString() === "__LAYOUT__") {
@@ -864,7 +864,7 @@ Scripting.addGlobal(function redo() { return UndoManager.Redo(); });
Scripting.addGlobal(function curPresentationItem() {
const curPres = Doc.UserDoc().curPresentation as Doc;
return curPres && DocListCast(curPres[Doc.LayoutFieldKey(curPres)])[NumCast(curPres._itemIndex)];
-})
+});
Scripting.addGlobal(function selectDoc(doc: any) { Doc.UserDoc().SelectedDocs = new List([doc]); });
Scripting.addGlobal(function selectedDocs(container: Doc, excludeCollections: boolean, prevValue: any) {
const docs = DocListCast(Doc.UserDoc().SelectedDocs).filter(d => !Doc.AreProtosEqual(d, container) && !d.annotationOn && d.type !== DocumentType.DOCUMENT && d.type !== DocumentType.KVP && (!excludeCollections || !Cast(d.data, listSpec(Doc), null)));