From f3715b1f3c286ad5bf40c272e511ded3ed04e912 Mon Sep 17 00:00:00 2001 From: MoyuScript Date: Tue, 12 Dec 2017 22:39:27 +0800 Subject: [PATCH] Fix formatting --- src/Gradient.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Gradient.js b/src/Gradient.js index f02fb46..6d067b0 100644 --- a/src/Gradient.js +++ b/src/Gradient.js @@ -138,11 +138,13 @@ const parseColorStops = (args: Array, firstColorStopIndex: number, lineL } const absoluteValuedColorStops = colorStops.map(({color, stop}) => { + const absoluteStop = + lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null; + return { color, - stop: // $FlowFixMe - lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null + stop: absoluteStop }; });