Skip to content

Commit 5103b4b

Browse files
authored
Merge pull request Expensify#51377 from bernhardoj/fix/51127-can't-copy-to-clipboard
Fix copy to clipboard error because action is undefined
2 parents 652d2ff + e4681b8 commit 5103b4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/pages/home/report/ContextMenu/BaseReportActionContextMenu.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ function BaseReportActionContextMenu({
105105
draftMessage = '',
106106
reportActionID,
107107
reportID,
108+
originalReportID,
108109
checkIfContextMenuActive,
109110
disabledActions = [],
110111
setIsEmojiPickerActive,
@@ -120,7 +121,7 @@ function BaseReportActionContextMenu({
120121
const {isProduction} = useEnvironment();
121122
const threedotRef = useRef<View>(null);
122123
const [betas] = useOnyx(ONYXKEYS.BETAS);
123-
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {
124+
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, {
124125
canEvict: false,
125126
});
126127
const transactionID = ReportActionsUtils.getLinkedTransactionID(reportActionID, reportID);
@@ -179,8 +180,6 @@ function BaseReportActionContextMenu({
179180
const areHoldRequirementsMet =
180181
!isInvoiceReport && isMoneyRequestOrReport && !ReportUtils.isArchivedRoom(transactionThreadReportID ? childReport : parentReport, parentReportNameValuePairs);
181182

182-
const originalReportID = useMemo(() => ReportUtils.getOriginalReportID(reportID, reportAction), [reportID, reportAction]);
183-
184183
const shouldEnableArrowNavigation = !isMini && (isVisible || shouldKeepOpen);
185184
let filteredContextMenuActions = ContextMenuActions.filter(
186185
(contextAction) =>

0 commit comments

Comments
 (0)