Fix buildStyleInterpolator

Summary: This relied on NaN being turned into null (through JSON.stringify), which would then be handled by Yoga gracefully. But in some cases we do not call JSON.stringify and thus pass NaN directly to Yoga causing a problem.

Reviewed By: fkgozali

Differential Revision: D9764488

fbshipit-source-id: 021c9ffafba8f9bcef2476756a12df33c367bcb1
This commit is contained in:
Mehdi Mulani authored and Facebook Github Bot committed 2018-09-11 11:31:53 -07:00
1 parent 09e6e6c329
commit adaeba296e
1 file changed
+3
@@ -54,6 +54,9 @@ const computeNextValLinear = function(anim, from, to, value) {
if (hasRoundRatio) {
nextVal = Math.round(roundRatio * nextVal) / roundRatio;
}
if (!isFinite(nextVal)) {
nextVal = null;
}
return nextVal;
};