Fix ScrollViewProps.snapToInterval type

Summary:
`SnapToInterval` is a Float in JavaScript, if we pass it and try to convert it to Int, it crashes in C++.
exception

> libc++abi.dylib: terminating with uncaught exception of type folly::ConversionError: Loss of precision during arithmetic conversion: (long long) 1.15

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D19580509

fbshipit-source-id: f705f92953195a9e034f6ce3fe7a077007d5212d
This commit is contained in:
Samuel Susla
2020-01-28 04:15:02 -08:00
committed by Facebook Github Bot
parent 30491a2085
commit 4185a45be4
@@ -44,7 +44,7 @@ class ScrollViewProps final : public ViewProps {
const Float zoomScale{1.0};
const EdgeInsets contentInset{};
const EdgeInsets scrollIndicatorInsets{};
const int snapToInterval{};
const Float snapToInterval{};
const ScrollViewSnapToAlignment snapToAlignment{};
#pragma mark - DebugStringConvertible