Skip to content

Commit e59dbca

Browse files
committed
fix: compiler
1 parent 9da7ce7 commit e59dbca

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/components/ReportActionItem/MoneyRequestView.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,10 @@ function MoneyRequestView({
309309
const canEditDate = isEditable && canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.DATE, undefined, isChatReportArchived);
310310
const canEditDistance = isEditable && canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.DISTANCE, undefined, isChatReportArchived);
311311
const canEditDistanceRate = isEditable && canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.DISTANCE_RATE, undefined, isChatReportArchived);
312-
const canEditReport = useMemo(
313-
() =>
314-
isEditable &&
315-
canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.REPORT, undefined, isChatReportArchived, outstandingReportsByPolicyID) &&
316-
(!isPerDiemRequest || canSubmitPerDiemExpenseFromWorkspace(policy) || (isExpenseUnreported && !!perDiemOriginalPolicy)),
317-
[isEditable, parentReportAction, isChatReportArchived, outstandingReportsByPolicyID, isPerDiemRequest, policy, isExpenseUnreported, perDiemOriginalPolicy],
318-
);
312+
const canEditReport =
313+
isEditable &&
314+
canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.REPORT, undefined, isChatReportArchived, outstandingReportsByPolicyID) &&
315+
(!isPerDiemRequest || canSubmitPerDiemExpenseFromWorkspace(policy) || (isExpenseUnreported && !!perDiemOriginalPolicy));
319316

320317
// A flag for verifying that the current report is a sub-report of a expense chat
321318
// if the policy of the report is either Collect or Control, then this report must be tied to expense chat

0 commit comments

Comments
 (0)