Skip to content

Commit c0ec9ec

Browse files
Fix setLayoutAnimationEnabled assigning variable to itself
setLayoutAnimationEnabled was assigning isLayoutAnimationEnabled back to itself instead of the value parameter, making the function a no-op. This meant LayoutAnimation could never be toggled at runtime once initialized. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8bac1df commit c0ec9ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ let isLayoutAnimationEnabled: boolean =
4646
ReactNativeFeatureFlags.isLayoutAnimationEnabled();
4747

4848
function setLayoutAnimationEnabled(value: boolean) {
49-
isLayoutAnimationEnabled = isLayoutAnimationEnabled;
49+
isLayoutAnimationEnabled = value;
5050
}
5151

5252
/**

0 commit comments

Comments
 (0)