Skip to content

Commit a6cf436

Browse files
MelvinBotEskalifer1
andcommitted
Fix typecheck: use undefined instead of null for OnyxEntry parameter
OnyxEntry<T> is T | undefined (not T | null), so passing null to setSplitShares caused TS2345. Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
1 parent b830ffe commit a6cf436

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/actions/IOU/IOUSettersTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ describe('IOU setter functions', () => {
302302
});
303303

304304
it('should do nothing when transaction is null', async () => {
305-
setSplitShares(null, 10000, 'USD', [USER_ACCOUNT_ID, PARTICIPANT_ACCOUNT_ID]);
305+
setSplitShares(undefined, 10000, 'USD', [USER_ACCOUNT_ID, PARTICIPANT_ACCOUNT_ID]);
306306
await waitForBatchedUpdates();
307307

308308
const draft = await getOnyxValue(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${TRANSACTION_ID}`);

0 commit comments

Comments
 (0)