mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Enable the no-else-return
ESLint rule
Using `else` after `return` is not necessary, and can often lead to unnecessarily cluttered code. By using the `no-else-return` rule in ESLint we can avoid this pattern, see http://eslint.org/docs/rules/no-else-return.
This commit is contained in:
parent
049d7fa277
commit
4046d67fde
19 changed files with 67 additions and 79 deletions
|
@ -729,9 +729,8 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
[1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]);
|
||||
return new TrueTypeCompiled(
|
||||
parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
|
||||
} else {
|
||||
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
|
||||
}
|
||||
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue