mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Enable the consistent-return
ESLint rule
This rule is already enabled in mozilla-central, and helps ensure more consistent functions/methods, see https://searchfox.org/mozilla-central/rev/b9da45f63cb567244933c77b2c7e827a057d3f9b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js#119-120 Please see https://eslint.org/docs/rules/consistent-return for additional information.
This commit is contained in:
parent
ca2fee3d51
commit
173fbef05b
26 changed files with 105 additions and 55 deletions
|
@ -2021,13 +2021,14 @@ class WorkerTransport {
|
|||
|
||||
messageHandler.on('obj', function(data) {
|
||||
if (this.destroyed) {
|
||||
return; // Ignore any pending requests if the worker was terminated.
|
||||
// Ignore any pending requests if the worker was terminated.
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const [id, pageIndex, type, imageData] = data;
|
||||
const pageProxy = this.pageCache[pageIndex];
|
||||
if (pageProxy.objs.has(id)) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
|
@ -2064,6 +2065,7 @@ class WorkerTransport {
|
|||
default:
|
||||
throw new Error(`Got unknown object type ${type}`);
|
||||
}
|
||||
return undefined;
|
||||
}, this);
|
||||
|
||||
messageHandler.on('DocProgress', function(data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue