Skip to content

Commit

Permalink
refactor dependecy to a const
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Jul 4, 2024
1 parent e5dafe6 commit 002915c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export function useCurrentMergeThemeStyleVariationsWithUserConfig(
}, [] );
const { user: userVariation } = useContext( GlobalStylesContext );

const propertiesAsString = properties.toString();

return useMemo( () => {
const clonedUserVariation = cloneDeep( userVariation );

Expand Down Expand Up @@ -120,7 +122,7 @@ export function useCurrentMergeThemeStyleVariationsWithUserConfig(
return variationsByProperties?.length
? variationsByProperties.filter( hasThemeVariation )
: [];
}, [ properties.toString(), userVariation, variationsFromTheme ] );
}, [ propertiesAsString, userVariation, variationsFromTheme ] );
}

/**
Expand Down

0 comments on commit 002915c

Please sign in to comment.