mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-09 20:58:12 +08:00
fix(lint): fix linter issues in template store
This commit is contained in:
parent
9726618069
commit
ef8759dd62
1 changed files with 8 additions and 8 deletions
|
@ -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('<div class="nylas-n1-signature">');
|
||||
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});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue