diff --git a/src/Gradient.js b/src/Gradient.js index a197dbd..e4169a3 100644 --- a/src/Gradient.js +++ b/src/Gradient.js @@ -141,7 +141,7 @@ const parseColorStops = (args: Array, firstColorStopIndex: number, lineL return { color, // $FlowFixMe - stop: stop ? stop.getAbsoluteValue(lineLength) / lineLength : null + stop: lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null }; });