Skip to content

Commit

Permalink
Fix NaN color stop in IE
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed Dec 12, 2017
1 parent 3965a0f commit f50da97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gradient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
});

Expand Down

0 comments on commit f50da97

Please sign in to comment.