aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/TemplateMenu.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/TemplateMenu.tsx')
-rw-r--r--src/client/views/TemplateMenu.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/TemplateMenu.tsx b/src/client/views/TemplateMenu.tsx
index 83dbd3db3..996928cca 100644
--- a/src/client/views/TemplateMenu.tsx
+++ b/src/client/views/TemplateMenu.tsx
@@ -114,7 +114,7 @@ export class TemplateMenu extends React.Component<TemplateMenuProps> {
const templateName = StrCast(firstDoc.layoutKey, "layout").replace("layout_", "");
const noteTypesDoc = Cast(Doc.UserDoc().noteTypes, Doc, null);
const noteTypes = DocListCast(noteTypesDoc?.data);
- const addedTypes = DocListCast(Cast(Doc.UserDoc().templateButtons, Doc, null)?.data)
+ const addedTypes = DocListCast(Cast(Doc.UserDoc().templateButtons, Doc, null)?.data);
const layout = Doc.Layout(firstDoc);
const templateMenu: Array<JSX.Element> = [];
this.props.templates.forEach((checked, template) =>
@@ -170,8 +170,8 @@ Scripting.addGlobal(function switchView(doc: Doc, template: Doc) {
if (template.dragFactory) {
template = Cast(template.dragFactory, Doc, null);
}
- let templateTitle = StrCast(template?.title);
- return templateTitle && DocumentView.makeCustomViewClicked(doc, undefined, Docs.Create.FreeformDocument, templateTitle, template)
+ const templateTitle = StrCast(template?.title);
+ return templateTitle && DocumentView.makeCustomViewClicked(doc, undefined, Docs.Create.FreeformDocument, templateTitle, template);
});
Scripting.addGlobal(function templateIsUsed(templateDoc: Doc, firstDocTitlte: string) {
@@ -180,4 +180,4 @@ Scripting.addGlobal(function templateIsUsed(templateDoc: Doc, firstDocTitlte: st
const template = StrCast(templateDoc.dragFactory ? Cast(templateDoc.dragFactory, Doc, null)?.title : templateDoc.title);
return StrCast(firstDoc.layoutKey) === "layout_" + template ? 'check' : 'unchecked';
// return SelectionManager.SelectedDocuments().some(view => StrCast(view.props.Document.layoutKey) === "layout_" + template) ? 'check' : 'unchecked'
-}) \ No newline at end of file
+}); \ No newline at end of file