Skip to content

Commit

Permalink
Fix gating for AnimatedObject
Browse files Browse the repository at this point in the history
Differential Revision: D45055855

fbshipit-source-id: fd2dec1d41f5f3ae86b18b3cd9f036bd086acd04
  • Loading branch information
genkikondo authored and facebook-github-bot committed Apr 17, 2023
1 parent eb83356 commit fe20081
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import type {PlatformConfig} from '../AnimatedPlatformConfig';

import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
import {findNodeHandle} from '../../ReactNative/RendererProxy';
import {AnimatedEvent} from '../AnimatedEvent';
import NativeAnimatedHelper from '../NativeAnimatedHelper';
Expand All @@ -29,10 +28,7 @@ function createAnimatedProps(inputProps: Object): Object {
props[key] = new AnimatedStyle(value);
} else if (value instanceof AnimatedNode) {
props[key] = value;
} else if (
ReactNativeFeatureFlags.isAnimatedObjectEnabled &&
hasAnimatedNode(value)
) {
} else if (hasAnimatedNode(value)) {
props[key] = new AnimatedObject(value);
} else {
props[key] = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import type {PlatformConfig} from '../AnimatedPlatformConfig';

import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
import flattenStyle from '../../StyleSheet/flattenStyle';
import Platform from '../../Utilities/Platform';
import NativeAnimatedHelper from '../NativeAnimatedHelper';
Expand All @@ -34,10 +33,7 @@ function createAnimatedStyle(
animatedStyles[key] = new AnimatedTransform(value);
} else if (value instanceof AnimatedNode) {
animatedStyles[key] = value;
} else if (
ReactNativeFeatureFlags.isAnimatedObjectEnabled &&
hasAnimatedNode(value)
) {
} else if (hasAnimatedNode(value)) {
animatedStyles[key] = new AnimatedObject(value);
} else if (keepUnanimatedValues) {
animatedStyles[key] = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export type FeatureFlags = {|
* Enables access to the host tree in Fabric using DOM-compatible APIs.
*/
enableAccessToHostTreeInFabric: () => boolean,
/**
* Enables animating object and array prop values.
*/
isAnimatedObjectEnabled: () => boolean,
|};

const ReactNativeFeatureFlags: FeatureFlags = {
Expand All @@ -59,7 +55,6 @@ const ReactNativeFeatureFlags: FeatureFlags = {
animatedShouldUseSingleOp: () => false,
isGlobalWebPerformanceLoggerEnabled: () => false,
enableAccessToHostTreeInFabric: () => false,
isAnimatedObjectEnabled: () => false,
};

module.exports = ReactNativeFeatureFlags;

0 comments on commit fe20081

Please sign in to comment.