From 6d75637ace341b79a6a12c7854b13fb1c279498f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 15 Feb 2020 19:48:02 -0500 Subject: [PATCH] Fix brace style issues --- ext/bg/js/backend.js | 21 +++++++++++++++------ ext/fg/js/document.js | 3 +-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 16dffc85..7c71f82c 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -801,8 +801,11 @@ class Backend { await new Promise((resolve, reject) => { chrome.tabs.update(tab.id, {active: true}, () => { const e = chrome.runtime.lastError; - if (e) { reject(e); } - else { resolve(); } + if (e) { + reject(e); + } else { + resolve(); + } }); }); @@ -815,16 +818,22 @@ class Backend { const tabWindow = await new Promise((resolve, reject) => { chrome.windows.get(tab.windowId, {}, (tabWindow) => { const e = chrome.runtime.lastError; - if (e) { reject(e); } - else { resolve(tabWindow); } + if (e) { + reject(e); + } else { + resolve(tabWindow); + } }); }); if (!tabWindow.focused) { await new Promise((resolve, reject) => { chrome.windows.update(tab.windowId, {focused: true}, () => { const e = chrome.runtime.lastError; - if (e) { reject(e); } - else { resolve(); } + if (e) { + reject(e); + } else { + resolve(); + } }); }); } diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js index 7284cdd1..ea9ac965 100644 --- a/ext/fg/js/document.js +++ b/ext/fg/js/document.js @@ -192,8 +192,7 @@ function docSentenceExtract(source, extent) { if (terminators.includes(c)) { endPos = i + 1; break; - } - else if (c in quotesBwd) { + } else if (c in quotesBwd) { endPos = i; break; }