summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-15 19:48:02 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-22 14:52:08 -0500
commit6d75637ace341b79a6a12c7854b13fb1c279498f (patch)
treea07862613f7b3aec1a59cc82c602603316600891 /ext/bg/js
parent1944f7a2157fd63fd04beb374ee5d9fb797e2531 (diff)
Fix brace style issues
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js21
1 files changed, 15 insertions, 6 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();
+ }
});
});
}