diff --git a/src/core/pattern.js b/src/core/pattern.js index e153b54d5..7cdee3fc3 100644 --- a/src/core/pattern.js +++ b/src/core/pattern.js @@ -414,14 +414,7 @@ class FunctionBasedShading extends BaseShading { const fn = pdfFunctionFactory.create(fnObj, /* parseArray = */ true); // Domain [x0, x1, y0, y1]; defaults to [0, 1, 0, 1]. - let x0 = 0, - x1 = 1, - y0 = 0, - y1 = 1; - const domainArr = lookupRect(dict.getArray("Domain"), null); - if (domainArr) { - [x0, x1, y0, y1] = domainArr; - } + const [x0, x1, y0, y1] = lookupRect(dict.getArray("Domain"), [0, 1, 0, 1]); // Matrix maps shading (domain) space to user space; defaults to identity. const matrix = lookupMatrix(dict.getArray("Matrix"), IDENTITY_MATRIX);