mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable the unicorn/prefer-ternary
ESLint plugin rule
To limit the readability impact of these changes, the `only-single-line` option was used; please find additional details at https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md These changes were done automatically, using the `gulp lint --fix` command.
This commit is contained in:
parent
8f83a1359e
commit
674e7ee381
31 changed files with 123 additions and 265 deletions
|
@ -116,11 +116,10 @@ class RadialAxialShading extends BaseShading {
|
|||
localColorSpaceCache,
|
||||
});
|
||||
const bbox = dict.getArray("BBox");
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
this.bbox = Util.normalizeRect(bbox);
|
||||
} else {
|
||||
this.bbox = null;
|
||||
}
|
||||
this.bbox =
|
||||
Array.isArray(bbox) && bbox.length === 4
|
||||
? Util.normalizeRect(bbox)
|
||||
: null;
|
||||
|
||||
let t0 = 0.0,
|
||||
t1 = 1.0;
|
||||
|
@ -458,11 +457,10 @@ class MeshShading extends BaseShading {
|
|||
const dict = stream.dict;
|
||||
this.shadingType = dict.get("ShadingType");
|
||||
const bbox = dict.getArray("BBox");
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
this.bbox = Util.normalizeRect(bbox);
|
||||
} else {
|
||||
this.bbox = null;
|
||||
}
|
||||
this.bbox =
|
||||
Array.isArray(bbox) && bbox.length === 4
|
||||
? Util.normalizeRect(bbox)
|
||||
: null;
|
||||
const cs = ColorSpace.parse({
|
||||
cs: dict.getRaw("CS") || dict.getRaw("ColorSpace"),
|
||||
xref,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue