SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Properly validate layout animation config

Summary:
The type key for a layout animation config must be supplied otherwise the app crashes (on Android). I added a isRequired check in JS as well as an explicit exception in java otherwise it crashed at a very hard to debug place. The crash happens when passing null to `Animation.setInterpolator` so this makes sure it never happens.

**Test plan (required)**

Tested that the error is caught properly in JS when passing an invalid animation config like

```
LayoutAnimation.configureNext({
  duration: 250,
   update: { type: undefined }, // or LayoutAnimation.Types.easeInEastOut in my case haha :)
});
```

Also tested the java exception.
Closes https://github.com/facebook/react-native/pull/7958

Differential Revision: D3401760

Pulled By: nicklockwood

fbshipit-source-id: 83c019d863c2b2294405b60e87297c562add0f49
J
Janic Duplessis committed
d4e7c8a0550891208284bd1d900bd9721d899f8f
Parent: 0e50373
Committed by Facebook Github Bot 5 <facebook-github-bot-5-bot@fb.com> on 6/7/2016, 11:28:29 PM