Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed May 8, 2024
1 parent 5bdec60 commit a8cee69
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ function getWhisperedTo(reportAction: OnyxEntry<ReportAction> | EmptyObject): nu
const message = reportAction?.message;

if (!Array.isArray(message) && typeof message === 'object') {
return ((message as ReportActionMessageJSON)?.whisperedTo ?? []);
return (message as ReportActionMessageJSON)?.whisperedTo ?? [];
}

if (originalMessage) {
return ((originalMessage as ReportActionMessageJSON)?.whisperedTo ?? []);
return (originalMessage as ReportActionMessageJSON)?.whisperedTo ?? [];
}

return [];
Expand Down
8 changes: 7 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4188,7 +4188,13 @@ function buildOptimisticMovedTrackedExpenseModifiedReportAction(transactionThrea
* @param [transaction] - optimistic newest transaction of a report preview
*
*/
function updateReportPreview(iouReport: OnyxEntry<Report>, reportPreviewAction: ReportPreviewAction, isPayRequest = false, comment = '', transaction: OnyxEntry<Transaction> = null): ReportPreviewAction {
function updateReportPreview(
iouReport: OnyxEntry<Report>,
reportPreviewAction: ReportPreviewAction,
isPayRequest = false,
comment = '',
transaction: OnyxEntry<Transaction> = null,
): ReportPreviewAction {
const hasReceipt = TransactionUtils.hasReceipt(transaction);
const recentReceiptTransactions = reportPreviewAction?.childRecentReceiptTransactionIDs ?? {};
const transactionsToKeep = TransactionUtils.getRecentTransactions(recentReceiptTransactions);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ import type {Participant, Split} from '@src/types/onyx/IOU';
import type {ErrorFields, Errors} from '@src/types/onyx/OnyxCommon';
import type {IOUMessage, PaymentMethodType} from '@src/types/onyx/OriginalMessage';
import type ReportAction from '@src/types/onyx/ReportAction';
import type {ReportPreviewAction} from '@src/types/onyx/ReportAction';
import type {OnyxData} from '@src/types/onyx/Request';
import type {Comment, Receipt, ReceiptSource, SplitShares, TransactionChanges, WaypointCollection} from '@src/types/onyx/Transaction';
import type {EmptyObject} from '@src/types/utils/EmptyObject';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import type {ReportPreviewAction} from '@src/types/onyx/ReportAction';
import * as CachedPDFPaths from './CachedPDFPaths';
import * as Policy from './Policy';
import * as Report from './Report';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/reportActionPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default {
IOUTransactionID: PropTypes.string,

/** accountIDs of the people to which the whisper was sent to (if any). Returns empty array if it is not a whisper */
whisperedTo: PropTypes.arrayOf(PropTypes.number)
whisperedTo: PropTypes.arrayOf(PropTypes.number),
}),

/** Error message that's come back from the server. */
Expand Down
2 changes: 1 addition & 1 deletion src/types/onyx/ReportAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type ONYXKEYS from '@src/ONYXKEYS';
import type CollectionDataSet from '@src/types/utils/CollectionDataSet';
import type {EmptyObject} from '@src/types/utils/EmptyObject';
import type * as OnyxCommon from './OnyxCommon';
import type {Decision, OriginalMessageReportPreview, Reaction, OriginalMessageModifiedExpense} from './OriginalMessage';
import type {Decision, OriginalMessageModifiedExpense, OriginalMessageReportPreview, Reaction} from './OriginalMessage';
import type OriginalMessage from './OriginalMessage';
import type {NotificationPreference} from './Report';
import type {Receipt} from './Transaction';
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/ReportUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import * as ReportUtils from '@libs/ReportUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {PersonalDetailsList, Policy, Report, ReportAction} from '@src/types/onyx';
import {toCollectionDataSet} from '@src/types/utils/CollectionDataSet';
import type {ModifiedExpenseAction} from '@src/types/onyx/ReportAction';
import {toCollectionDataSet} from '@src/types/utils/CollectionDataSet';
import * as NumberUtils from '../../src/libs/NumberUtils';
import * as LHNTestUtils from '../utils/LHNTestUtils';
import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
Expand Down

0 comments on commit a8cee69

Please sign in to comment.