Skip to content

Commit

Permalink
Merge pull request #11283 from Snuffleupagus/hasBlendModes-Array
Browse files Browse the repository at this point in the history
Ensure that `PartialEvaluator.hasBlendModes` handles Blend Modes in Arrays (PR 11281 follow-up)
  • Loading branch information
timvandermeij committed Oct 28, 2019
2 parents 3173756 + 0496ea6 commit 16fb543
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/core/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,20 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
if (graphicState.objId) {
processed[graphicState.objId] = true;
}
var bm = graphicState.get('BM');
if ((bm instanceof Name) && bm.name !== 'Normal') {
return true;

const bm = graphicState.get('BM');
if (bm instanceof Name) {
if (bm.name !== 'Normal') {
return true;
}
continue;
}
if (bm !== undefined && Array.isArray(bm)) {
for (let j = 0, jj = bm.length; j < jj; j++) {
if ((bm[j] instanceof Name) && bm[j].name !== 'Normal') {
return true;
}
}
}
}
}
Expand Down

0 comments on commit 16fb543

Please sign in to comment.