Skip to content

Commit

Permalink
Remove redundant call to parseColors (#3872)
Browse files Browse the repository at this point in the history
## Summary

This PR removes a chunk of code that was supposed to be executed only if a worklet has some optimization applied in Babel plugin but since #3722 completely removes these optimizations, this chunk of code is no longer necessary.

Co-authored-by: @kmagiera @piaskowyk 

## Test plan

Check if BokehExample works correctly.
  • Loading branch information
tomekzaw authored Dec 16, 2022
1 parent b48c0f2 commit 1ba563a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/reanimated2/hook/useAnimatedStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
buildWorkletsHash,
getStyleWithoutAnimations,
isAnimated,
parseColors,
styleDiff,
validateAnimatedStyles,
} from './utils';
Expand All @@ -21,7 +20,7 @@ import {
ViewDescriptorsSet,
ViewRefSet,
} from '../ViewDescriptorsSet';
import { isJest, shouldBeUseWeb } from '../PlatformChecker';
import { isJest } from '../PlatformChecker';
import {
AnimationObject,
Timestamp,
Expand Down Expand Up @@ -460,15 +459,6 @@ export function useAnimatedStyle<T extends AnimatedStyle>(
};
}

if (!shouldBeUseWeb()) {
updaterFn = () => {
'worklet';
const style = updaterFn();
parseColors(style);
return style;
};
}

if (isJest()) {
fun = () => {
'worklet';
Expand Down

0 comments on commit 1ba563a

Please sign in to comment.