Skip to content

Commit fca9483

Browse files
committed
Node 4 compatibility
1 parent c67eac1 commit fca9483

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function applyGradient(str, gradient, opts) {
2929
function multilineGradient(str, gradient, opts) {
3030
const options = validateOptions(opts);
3131
const lines = str.split('\n');
32-
const maxLength = Math.max(gradient.stops.length, ...(lines.map(l => l.length)));
32+
const maxLength = Math.max.apply(null, lines.map(l => l.length).concat([gradient.stops.length]));
3333
const colors = getColors(gradient, options, maxLength);
3434
const results = [];
3535
for (const line of lines) {

0 commit comments

Comments
 (0)