Skip to content

Commit

Permalink
fix: fixing EqualToValue, making both compared values ​​have the same…
Browse files Browse the repository at this point in the history
… type M2-8277 (#907)

* fix/M2-8277_fixing_EqualToValue

* fixing unit test

* lint and reverting podfile

---------

Co-authored-by: Felipe Imperio <felipeimp@Felipes-MacBook-Pro.local>
  • Loading branch information
felipeMetaLab and Felipe Imperio authored Dec 2, 2024
1 parent 47e08a4 commit 9afa887
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/entities/conditional-logic/model/conditions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ describe('[isEqualToValue] function', () => {
{ a: 1, b: 2 },
{ a: 'Hello', b: 'Bye' },
{ a: 0, b: -1 },
{ a: {}, b: {} },
];

differentValueTestCases.forEach(({ a, b }) => {
Expand Down
3 changes: 1 addition & 2 deletions src/entities/conditional-logic/model/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export const isEqualToValue = (
if (input == null) {
return false;
}

return input === valueToCompareWith;
return input.toString() === valueToCompareWith.toString();
};

export const isGreaterThan = (
Expand Down

0 comments on commit 9afa887

Please sign in to comment.