Fix NaN color stop in IE

This commit is contained in:
Niklas von Hertzen 2017-12-12 22:08:46 +08:00
parent 3965a0fd40
commit f50da9718f

View File

@ -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
};
});