Skip to content

Commit

Permalink
Node 4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
bokub committed Oct 27, 2017
1 parent c67eac1 commit fca9483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function applyGradient(str, gradient, opts) {
function multilineGradient(str, gradient, opts) {
const options = validateOptions(opts);
const lines = str.split('\n');
const maxLength = Math.max(gradient.stops.length, ...(lines.map(l => l.length)));
const maxLength = Math.max.apply(null, lines.map(l => l.length).concat([gradient.stops.length]));
const colors = getColors(gradient, options, maxLength);
const results = [];
for (const line of lines) {
Expand Down

0 comments on commit fca9483

Please sign in to comment.