Closed
Description
The AnimatedValue.js throws an error on line 58
when node.__getChildren().forEach(findAnimatedStyles);
is called on _flush
function sometimes.
React Native version: 0.58.3
Steps To Reproduce
1 - create variable with Animated.Value
2 - update the value
Describe what you expected to happen:
Animations work properly.
Snack, code example, or link to a repository:
The error happens in node_modules/react-native/Libraries/Animated/src/nodes/AnimatedValue.js in findAnimatedStyles at line 58:28:
function _flush(rootNode: AnimatedValue): void {
const animatedStyles = new Set();
function findAnimatedStyles(node) {
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.68 was deployed. To see the error delete this
* comment and run Flow. */
if (typeof node.update === 'function') {
animatedStyles.add(node);
} else {
node.__getChildren().forEach(findAnimatedStyles);
}
}
findAnimatedStyles(rootNode);
/* $FlowFixMe */
animatedStyles.forEach(animatedStyle => animatedStyle.update());
}
Throws TypeError: s.__getChildren().forEach is not a function. (In 's.__getChildren().forEach(t)', 's.__getChildren().forEach' is undefined)
Error screenshot: