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:
parent
09e6e6c329
commit
adaeba296e
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue