From 178093c5cc6c52caced8bd69775576c82b009e46 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 28 Sep 2023 12:54:09 +0200 Subject: [PATCH 01/12] bump onyx --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42755b09f8b6..94292ea3f48a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -90,7 +90,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.94", + "react-native-onyx": "^1.0.95", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0", @@ -41204,9 +41204,9 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.94", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.94.tgz", - "integrity": "sha512-Xoh9LTdoCNLQjyeLB6HkBwyf5ipkSjnETLVijSIWKnecbZS8/fQehUuGz+yEk9I0xVEn43IhmnkQ+yqQvV9vEg==", + "version": "1.0.95", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.95.tgz", + "integrity": "sha512-mGcMkFWJ0V1P04/BNy3bLw17telQR8srbweqGJVennGdvlbaHqUTTKqa37i9tR7uu1O4bDHey01UKTysb9jRZQ==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", @@ -77269,9 +77269,9 @@ } }, "react-native-onyx": { - "version": "1.0.94", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.94.tgz", - "integrity": "sha512-Xoh9LTdoCNLQjyeLB6HkBwyf5ipkSjnETLVijSIWKnecbZS8/fQehUuGz+yEk9I0xVEn43IhmnkQ+yqQvV9vEg==", + "version": "1.0.95", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.95.tgz", + "integrity": "sha512-mGcMkFWJ0V1P04/BNy3bLw17telQR8srbweqGJVennGdvlbaHqUTTKqa37i9tR7uu1O4bDHey01UKTysb9jRZQ==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", diff --git a/package.json b/package.json index 3b88d603ba52..e0245808c79f 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.94", + "react-native-onyx": "^1.0.95", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0", From ff263377d62b023d82b8c7be3dcf93300a01aa2c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 30 Sep 2023 12:51:55 +0200 Subject: [PATCH 02/12] fix: tests --- tests/actions/IOUTest.js | 14 +++++++------- tests/actions/ReportTest.js | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/actions/IOUTest.js b/tests/actions/IOUTest.js index 3df3b137bab3..63fd7a0dd78b 100644 --- a/tests/actions/IOUTest.js +++ b/tests/actions/IOUTest.js @@ -1638,7 +1638,7 @@ describe('actions/IOU', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1647,7 +1647,7 @@ describe('actions/IOU', () => { // Then check the loading state of our action const resultActionAfterUpdate = reportActions[reportActionID]; - expect(resultActionAfterUpdate.pendingAction).toBeNull(); + expect(resultActionAfterUpdate.pendingAction).toBeUndefined(); // When we attempt to delete a money request from the IOU report fetch.pause(); @@ -1818,7 +1818,7 @@ describe('actions/IOU', () => { // Then the report should have 2 actions expect(_.size(reportActions)).toBe(2); const resultActionAfter = reportActions[reportActionID]; - expect(resultActionAfter.pendingAction).toBeNull(); + expect(resultActionAfter.pendingAction).toBeUndefined(); fetch.pause(); // When deleting money request @@ -1903,7 +1903,7 @@ describe('actions/IOU', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1913,7 +1913,7 @@ describe('actions/IOU', () => { let resultActionAfterUpdate = reportActions[reportActionID]; // Verify that our action is no longer in the loading state - expect(resultActionAfterUpdate.pendingAction).toBeNull(); + expect(resultActionAfterUpdate.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1935,7 +1935,7 @@ describe('actions/IOU', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1945,7 +1945,7 @@ describe('actions/IOU', () => { resultActionAfterUpdate = reportActions[reportActionID]; // Verify that our action is no longer in the loading state - expect(resultActionAfterUpdate.pendingAction).toBeNull(); + expect(resultActionAfterUpdate.pendingAction).toBeUndefined(); fetch.pause(); // When we delete the money request diff --git a/tests/actions/ReportTest.js b/tests/actions/ReportTest.js index 06d8304111cb..aab454228d03 100644 --- a/tests/actions/ReportTest.js +++ b/tests/actions/ReportTest.js @@ -92,7 +92,7 @@ describe('actions/Report', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); // We subscribed to the Pusher channel above and now we need to simulate a reportComment action // Pusher event so we can verify that action was handled correctly and merged into the reportActions. @@ -129,7 +129,7 @@ describe('actions/Report', () => { const resultAction = reportActions[reportActionID]; // Verify that our action is no longer in the loading state - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); }); }); @@ -607,7 +607,7 @@ describe('actions/Report', () => { // Expect the reaction to have null where the users reaction used to be expect(reportActionsReactions).toHaveProperty(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`); const reportActionReaction = reportActionsReactions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`]; - expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeNull(); + expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeUndefined(); }) .then(() => { reportAction = _.first(_.values(reportActions)); @@ -649,7 +649,7 @@ describe('actions/Report', () => { // Expect the reaction to have null where the users reaction used to be expect(reportActionsReactions).toHaveProperty(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`); const reportActionReaction = reportActionsReactions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`]; - expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeNull(); + expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeUndefined(); }); }); }); @@ -716,7 +716,7 @@ describe('actions/Report', () => { // Expect the reaction to have null where the users reaction used to be expect(reportActionsReactions).toHaveProperty(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${resultAction.reportActionID}`); const reportActionReaction = reportActionsReactions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${resultAction.reportActionID}`]; - expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeNull(); + expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeUndefined(); }); }); }); From 8c78fa8b85d9b9e56ad1576bf63c09ef73bf0f6c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 5 Oct 2023 09:49:38 +0200 Subject: [PATCH 03/12] chore: update onyx --- package-lock.json | 14 +++++++------- package.json | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5751fe3ea8c8..edb81edcd4b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -92,7 +92,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.98", + "react-native-onyx": "^1.0.100", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0", @@ -41286,9 +41286,9 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.98", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.98.tgz", - "integrity": "sha512-2wJNmZVBJs2Y0p1G/es4tQZnplJR8rOyVbHv9KZaq/SXluLUnIovttf1MMhVXidDLT+gcE+u20Mck/Gpb8bY0w==", + "version": "1.0.100", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.100.tgz", + "integrity": "sha512-m4bOF/uOtYpfL83fqoWhw7TYV4oKGXt0sfGoel/fhaT1HzXKheXc//ibt/G3VrTCf5nmRv7bXgsXkWjUYLH3UQ==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", @@ -77470,9 +77470,9 @@ } }, "react-native-onyx": { - "version": "1.0.98", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.98.tgz", - "integrity": "sha512-2wJNmZVBJs2Y0p1G/es4tQZnplJR8rOyVbHv9KZaq/SXluLUnIovttf1MMhVXidDLT+gcE+u20Mck/Gpb8bY0w==", + "version": "1.0.100", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.100.tgz", + "integrity": "sha512-m4bOF/uOtYpfL83fqoWhw7TYV4oKGXt0sfGoel/fhaT1HzXKheXc//ibt/G3VrTCf5nmRv7bXgsXkWjUYLH3UQ==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", diff --git a/package.json b/package.json index 5eb19d8d2bbf..1d96344f572b 100644 --- a/package.json +++ b/package.json @@ -113,8 +113,8 @@ "react-collapse": "^5.1.0", "react-content-loader": "^6.1.0", "react-dom": "18.1.0", - "react-map-gl": "^7.1.3", "react-error-boundary": "^4.0.11", + "react-map-gl": "^7.1.3", "react-native": "0.72.4", "react-native-blob-util": "^0.17.3", "react-native-collapsible": "^1.6.0", @@ -135,7 +135,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.98", + "react-native-onyx": "^1.0.100", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0", From dac13616502aa1b2b1506be958c5e798fde45cd9 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 5 Oct 2023 10:40:20 +0200 Subject: [PATCH 04/12] fix: MigrationTest --- tests/unit/MigrationTest.js | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index bed273213c90..cbf78e0152b0 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -37,18 +37,12 @@ describe('Migrations', () => { }) .then(PersonalDetailsByAccountID) .then(() => { - expect(LogSpy).toHaveBeenCalledWith( - `[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1 because there were no reportActions`, - ); - expect(LogSpy).toHaveBeenCalledWith( - `[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2 because there were no reportActions`, - ); const connectionID = Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, waitForCollectionCallback: true, callback: (allReportActions) => { Onyx.disconnect(connectionID); - _.each(allReportActions, (reportActionsForReport) => expect(reportActionsForReport).toBeNull()); + _.each(allReportActions, (reportActionsForReport) => expect(reportActionsForReport).toBeUndefined()); }, }); })); @@ -377,8 +371,8 @@ describe('Migrations', () => { waitForCollectionCallback: true, callback: (allPolicyMemberLists) => { Onyx.disconnect(connectionID); - expect(allPolicyMemberLists[`${ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST}1`]).toBeNull(); - expect(allPolicyMemberLists[`${ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST}2`]).toBeNull(); + expect(allPolicyMemberLists[`${ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST}1`]).toBeUndefined(); + expect(allPolicyMemberLists[`${ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST}2`]).toBeUndefined(); }, }); })); @@ -403,7 +397,7 @@ describe('Migrations', () => { key: DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS, callback: (allPersonalDetails) => { Onyx.disconnect(connectionID); - expect(allPersonalDetails).toBeNull(); + expect(allPersonalDetails).toBeUndefined(); }, }); })); @@ -554,8 +548,8 @@ describe('Migrations', () => { Onyx.disconnect(connectionID); const expectedReportAction = {}; expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toMatchObject(expectedReportAction); - expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]).toMatchObject(expectedReportAction); - expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}3`]).toMatchObject(expectedReportAction); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]).toBeUndefined(); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}3`]).toBeUndefined(); expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}4`]).toMatchObject(expectedReportAction); }, }); @@ -597,8 +591,8 @@ describe('Migrations', () => { }, }; expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toMatchObject(expectedReportAction1); - expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]).toBeNull(); - expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}3`]).toBeNull(); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]).toBeUndefined(); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}3`]).toBeUndefined(); expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}4`]).toMatchObject(expectedReportAction4); }, }); @@ -620,10 +614,10 @@ describe('Migrations', () => { callback: (allReportActions) => { Onyx.disconnect(connectionID); const expectedReportAction = {}; - expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toBeNull(); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toBeUndefined(); expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]).toMatchObject(expectedReportAction); expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}3`]).toMatchObject(expectedReportAction); - expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}4`]).toBeNull(); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}4`]).toBeUndefined(); }, }); })); From cec1f18eea65fe6f02abb00bb0253702d7ed4b26 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 5 Oct 2023 10:54:49 +0200 Subject: [PATCH 05/12] fix: MigrationTest --- tests/unit/MigrationTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index cbf78e0152b0..eb70d94e141d 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -397,7 +397,7 @@ describe('Migrations', () => { key: DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS, callback: (allPersonalDetails) => { Onyx.disconnect(connectionID); - expect(allPersonalDetails).toBeUndefined(); + expect(allPersonalDetails).toBeNull(); }, }); })); From ca4bd906a1b674a82f7c884e193ec9b853bb02fa Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 5 Oct 2023 11:05:07 +0200 Subject: [PATCH 06/12] fix: last test --- tests/unit/MigrationTest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index eb70d94e141d..d0e7f19d3d3f 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -371,8 +371,8 @@ describe('Migrations', () => { waitForCollectionCallback: true, callback: (allPolicyMemberLists) => { Onyx.disconnect(connectionID); - expect(allPolicyMemberLists[`${ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST}1`]).toBeUndefined(); - expect(allPolicyMemberLists[`${ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST}2`]).toBeUndefined(); + + expect(allPolicyMemberLists).toBeFalsy(); }, }); })); From 616ec045e4b357aac0007ea43a19dfe24a0ea788 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 7 Oct 2023 16:19:16 +0200 Subject: [PATCH 07/12] fix: explicit null check in ReportActionItemEmojiReactions --- src/components/Reactions/ReportActionItemEmojiReactions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Reactions/ReportActionItemEmojiReactions.js b/src/components/Reactions/ReportActionItemEmojiReactions.js index 7ead2ab67ae7..0a59553f7df5 100644 --- a/src/components/Reactions/ReportActionItemEmojiReactions.js +++ b/src/components/Reactions/ReportActionItemEmojiReactions.js @@ -122,7 +122,7 @@ function ReportActionItemEmojiReactions(props) { totalReactionCount > 0 && ( {_.map(formattedReactions, (reaction) => { - if (reaction === null) { + if (reaction === null || reaction === undefined) { return; } return ( From 45aaca8890e0dcfd42b227983f831ce26c0cec67 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 7 Oct 2023 16:20:50 +0200 Subject: [PATCH 08/12] revert change --- src/components/Reactions/ReportActionItemEmojiReactions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Reactions/ReportActionItemEmojiReactions.js b/src/components/Reactions/ReportActionItemEmojiReactions.js index 0a59553f7df5..7ead2ab67ae7 100644 --- a/src/components/Reactions/ReportActionItemEmojiReactions.js +++ b/src/components/Reactions/ReportActionItemEmojiReactions.js @@ -122,7 +122,7 @@ function ReportActionItemEmojiReactions(props) { totalReactionCount > 0 && ( {_.map(formattedReactions, (reaction) => { - if (reaction === null || reaction === undefined) { + if (reaction === null) { return; } return ( From ed7d7e53b0277fa224a31743f0d74d30fc5faaee Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 7 Oct 2023 16:23:04 +0200 Subject: [PATCH 09/12] remove explicit null check --- src/libs/EmojiUtils.js | 2 +- src/pages/home/sidebar/SidebarLinks.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/EmojiUtils.js b/src/libs/EmojiUtils.js index 136eee5a4116..4c799cd93298 100644 --- a/src/libs/EmojiUtils.js +++ b/src/libs/EmojiUtils.js @@ -415,7 +415,7 @@ function suggestEmojis(text, lang, limit = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMO * @returns {Number} */ const getPreferredSkinToneIndex = (val) => { - if (!_.isNull(val) && Number.isInteger(Number(val))) { + if (!_.isNull(val) && _.isUndefined(val) && Number.isInteger(Number(val))) { return val; } diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 6b232cf31f40..c8ce8d80fc5c 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -70,7 +70,7 @@ function SidebarLinks({onLinkClick, insets, optionListItems, isLoading, priority const unsubscribeOnyxModal = onyxSubscribe({ key: ONYXKEYS.MODAL, callback: (modalArg) => { - if (_.isNull(modalArg)) { + if (_.isNull(modalArg) || _.isUndefined(modalArg)) { return; } modal.current = modalArg; From abb7ee25b8d8a7769d0b212ef4c9542537200dce Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 11 Oct 2023 10:15:46 +0200 Subject: [PATCH 10/12] fix: invalid condition --- src/libs/EmojiUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/EmojiUtils.js b/src/libs/EmojiUtils.js index 6120cf0058ce..a44a69f087ab 100644 --- a/src/libs/EmojiUtils.js +++ b/src/libs/EmojiUtils.js @@ -426,7 +426,7 @@ function suggestEmojis(text, lang, limit = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMO * @returns {Number} */ const getPreferredSkinToneIndex = (val) => { - if (!_.isNull(val) && _.isUndefined(val) && Number.isInteger(Number(val))) { + if (!_.isNull(val) && !_.isUndefined(val) && Number.isInteger(Number(val))) { return val; } From 91156fc4b825168364835487fbb4a33fc0459080 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 11 Oct 2023 10:15:58 +0200 Subject: [PATCH 11/12] set specific onyx version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90c420e09b5b..9636ffe243c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,7 +94,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "^1.0.100", + "react-native-onyx": "1.0.100", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0", diff --git a/package.json b/package.json index 702fe2372557..c29f1a209c3c 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "^1.0.100", + "react-native-onyx": "1.0.100", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0", From c64ee25d09393ebe877194daf2434b6e9876134d Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 12 Oct 2023 09:15:52 +0200 Subject: [PATCH 12/12] fix: update condition --- src/pages/home/sidebar/SidebarLinks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index c8ce8d80fc5c..d3ff3070466f 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -70,7 +70,7 @@ function SidebarLinks({onLinkClick, insets, optionListItems, isLoading, priority const unsubscribeOnyxModal = onyxSubscribe({ key: ONYXKEYS.MODAL, callback: (modalArg) => { - if (_.isNull(modalArg) || _.isUndefined(modalArg)) { + if (_.isNull(modalArg) || typeof modalArg !== 'object') { return; } modal.current = modalArg;