1
0
mirror of https://github.com/niklasvh/html2canvas.git synced 2023-08-10 21:13:10 +03:00

Fix NaN color stop in IE

This commit is contained in:
MoyuScript 2017-12-12 22:08:46 +08:00
parent 9fdba127bf
commit 075b66c01c

@ -141,7 +141,7 @@ const parseColorStops = (args: Array<string>, firstColorStopIndex: number, lineL
return {
color,
// $FlowFixMe
stop: stop ? stop.getAbsoluteValue(lineLength) / lineLength : null
stop: lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null
};
});