aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background/offscreen-proxy.js
diff options
context:
space:
mode:
authorCashew <52880648+Scrub1492@users.noreply.github.com>2023-12-20 21:36:27 +0900
committerGitHub <noreply@github.com>2023-12-20 12:36:27 +0000
commit229f04ba358b3485fa7952088e03dad9e651bb23 (patch)
treedfb4a0431368e2067d7e6f5d9ce08bf88e1730cd /ext/js/background/offscreen-proxy.js
parent8b943cc97fab890085448122e7c13dd035d0e238 (diff)
rename variables (#409)
* rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions
Diffstat (limited to 'ext/js/background/offscreen-proxy.js')
-rw-r--r--ext/js/background/offscreen-proxy.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/js/background/offscreen-proxy.js b/ext/js/background/offscreen-proxy.js
index 63f619fa..dfd342b4 100644
--- a/ext/js/background/offscreen-proxy.js
+++ b/ext/js/background/offscreen-proxy.js
@@ -95,16 +95,16 @@ export class OffscreenProxy {
* @throws {Error}
*/
_getMessageResponseResult(response) {
- const error = chrome.runtime.lastError;
- if (error) {
- throw new Error(error.message);
+ const runtimeError = chrome.runtime.lastError;
+ if (typeof runtimeError !== 'undefined') {
+ throw new Error(runtimeError.message);
}
if (!isObject(response)) {
throw new Error('Offscreen document did not respond');
}
- const error2 = response.error;
- if (error2) {
- throw ExtensionError.deserialize(error2);
+ const responseError = response.error;
+ if (responseError) {
+ throw ExtensionError.deserialize(responseError);
}
return response.result;
}