Skip to content

Commit

Permalink
Merge branch 'main' into chore/update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek authored Nov 27, 2023
2 parents bf2c449 + 84ee540 commit 32f12a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unleash/proxy-client-react",
"version": "4.0.3",
"version": "4.1.0",
"description": "React interface for working with unleash",
"type": "module",
"main": "./dist/unleash-react.umd.cjs",
Expand Down
2 changes: 1 addition & 1 deletion src/integration.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test('should render toggles', async () => {
expect(screen.getByTestId('ready')).toHaveTextContent('true');
expect(screen.getByTestId('state')).toHaveTextContent('true');
expect(screen.getByTestId('variant')).toHaveTextContent(
'{"name":"A","payload":{"type":"string","value":"A"},"enabled":true}'
'{"name":"A","payload":{"type":"string","value":"A"},"enabled":true,"feature_enabled":true}'
);
});

Expand Down
1 change: 1 addition & 0 deletions src/useVariant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const variantHasChanged = (
const variantsAreEqual =
oldVariant.name === newVariant?.name &&
oldVariant.enabled === newVariant?.enabled &&
oldVariant.feature_enabled === newVariant?.feature_enabled &&
oldVariant.payload?.type === newVariant?.payload?.type &&
oldVariant.payload?.value === newVariant?.payload?.value;

Expand Down

0 comments on commit 32f12a1

Please sign in to comment.