diff --git a/internal_packages/composer-templates/lib/template-store.es6 b/internal_packages/composer-templates/lib/template-store.es6
index 2c1c982b2..33c12a57e 100644
--- a/internal_packages/composer-templates/lib/template-store.es6
+++ b/internal_packages/composer-templates/lib/template-store.es6
@@ -109,7 +109,7 @@ class TemplateStore extends NylasStore {
let draftContents = contents ? contents : QuotedHTMLTransformer.removeQuotedHTML(draft.body);
const sigIndex = draftContents.indexOf('
');
- draftContents = sigIndex>-1 ? draftContents.slice(0,sigIndex) : draftContents;
+ draftContents = sigIndex > -1 ? draftContents.slice(0, sigIndex) : draftContents;
if (!draftName || draftName.length === 0) {
this._displayError('Give your draft a subject to name your template.');
}
@@ -150,7 +150,7 @@ class TemplateStore extends NylasStore {
}
saveNewTemplate(name, contents, callback) {
- if(!name || name.length===0){
+ if (!name || name.length === 0) {
this._displayError('You must provide a template name.');
return;
}
@@ -227,12 +227,12 @@ class TemplateStore extends NylasStore {
this._displayError('Invalid template name! Names can only contain letters, numbers, spaces, dashes, and underscores.');
return;
}
- if(newName.length===0){
+ if (newName.length === 0) {
this._displayError('You must provide a template name.');
return;
}
- const newFilename = `${newName}.html`;
+ const newFilename = `${newName}.html`;
const oldPath = path.join(this._templatesDir, `${oldName}.html`);
const newPath = path.join(this._templatesDir, newFilename);
fs.rename(oldPath, newPath, () => {
@@ -245,7 +245,7 @@ class TemplateStore extends NylasStore {
}
_onInsertTemplateId({templateId, draftClientId} = {}) {
- this.getTemplateContents(templateId, (template_body) => {
+ this.getTemplateContents(templateId, (templateBody) => {
DraftStore.sessionForClientId(draftClientId).then((session)=> {
let proceed = true;
if (!session.draft().pristine) {
@@ -258,11 +258,11 @@ class TemplateStore extends NylasStore {
}
if (proceed) {
- let draftContents = QuotedHTMLTransformer.removeQuotedHTML(session.draft().body);
+ const draftContents = QuotedHTMLTransformer.removeQuotedHTML(session.draft().body);
const sigIndex = draftContents.indexOf('
');
- const signature = sigIndex>-1 ? draftContents.slice(sigIndex) : "";
+ const signature = sigIndex > -1 ? draftContents.slice(sigIndex) : '';
- const draftHtml = QuotedHTMLTransformer.appendQuotedHTML(template_body+signature, session.draft().body);
+ const draftHtml = QuotedHTMLTransformer.appendQuotedHTML(templateBody + signature, session.draft().body);
session.changes.add({body: draftHtml});
}
});