Fix brace style issues

This commit is contained in:
toasted-nutbread 2020-02-15 19:48:02 -05:00
parent 1944f7a215
commit 6d75637ace
2 changed files with 16 additions and 8 deletions

View File

@ -801,8 +801,11 @@ class Backend {
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
chrome.tabs.update(tab.id, {active: true}, () => { chrome.tabs.update(tab.id, {active: true}, () => {
const e = chrome.runtime.lastError; const e = chrome.runtime.lastError;
if (e) { reject(e); } if (e) {
else { resolve(); } reject(e);
} else {
resolve();
}
}); });
}); });
@ -815,16 +818,22 @@ class Backend {
const tabWindow = await new Promise((resolve, reject) => { const tabWindow = await new Promise((resolve, reject) => {
chrome.windows.get(tab.windowId, {}, (tabWindow) => { chrome.windows.get(tab.windowId, {}, (tabWindow) => {
const e = chrome.runtime.lastError; const e = chrome.runtime.lastError;
if (e) { reject(e); } if (e) {
else { resolve(tabWindow); } reject(e);
} else {
resolve(tabWindow);
}
}); });
}); });
if (!tabWindow.focused) { if (!tabWindow.focused) {
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
chrome.windows.update(tab.windowId, {focused: true}, () => { chrome.windows.update(tab.windowId, {focused: true}, () => {
const e = chrome.runtime.lastError; const e = chrome.runtime.lastError;
if (e) { reject(e); } if (e) {
else { resolve(); } reject(e);
} else {
resolve();
}
}); });
}); });
} }

View File

@ -192,8 +192,7 @@ function docSentenceExtract(source, extent) {
if (terminators.includes(c)) { if (terminators.includes(c)) {
endPos = i + 1; endPos = i + 1;
break; break;
} } else if (c in quotesBwd) {
else if (c in quotesBwd) {
endPos = i; endPos = i;
break; break;
} }