Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Dec 7, 2023
1 parent 71626c6 commit e4e5b8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ function getAllReportErrors(report, reportActions) {
if (ReportUtils.hasMissingSmartscanFields(report.reportID) && !ReportUtils.isSettled(report.reportID)) {
_.extend(reportActionErrors, {smartscan: ErrorUtils.getMicroSecondOnyxError('report.genericSmartscanFailureMessage')});
}
} else if (ReportUtils.hasRequestError(_.values(reportActions))) {
} else if (ReportUtils.hasSmartscanError(_.values(reportActions))) {
_.extend(reportActionErrors, {smartscan: ErrorUtils.getMicroSecondOnyxError('report.genericSmartscanFailureMessage')});
}

Expand Down
8 changes: 3 additions & 5 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4269,11 +4269,9 @@ function shouldDisableWelcomeMessage(report: OnyxEntry<Report>, policy: OnyxEntr
return isMoneyRequestReport(report) || isArchivedRoom(report) || !isChatRoom(report) || isChatThread(report) || !PolicyUtils.isPolicyAdmin(policy);
}
/**
*
* @param reportActions
* @returns
* Checks if report action has error when smart scanning
*/
function hasRequestError(reportActions: ReportAction[]) {
function hasSmartscanError(reportActions: ReportAction[]) {
return reportActions.some((action) => {
if (!ReportActionsUtils.isSplitBillAction(action) && !ReportActionsUtils.isReportPreviewAction(action)) {
return false;
Expand Down Expand Up @@ -4486,7 +4484,7 @@ export {
shouldDisableWelcomeMessage,
navigateToPrivateNotes,
canEditWriteCapability,
hasRequestError,
hasSmartscanError,
shouldAutoFocusOnKeyPress,
};

Expand Down

0 comments on commit e4e5b8f

Please sign in to comment.