Skip to content

Commit

Permalink
Merge pull request Expensify#51377 from bernhardoj/fix/51127-can't-co…
Browse files Browse the repository at this point in the history
…py-to-clipboard

Fix copy to clipboard error because action is undefined
  • Loading branch information
puneetlath authored Oct 27, 2024
2 parents 652d2ff + e4681b8 commit 5103b4b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function BaseReportActionContextMenu({
draftMessage = '',
reportActionID,
reportID,
originalReportID,
checkIfContextMenuActive,
disabledActions = [],
setIsEmojiPickerActive,
Expand All @@ -120,7 +121,7 @@ function BaseReportActionContextMenu({
const {isProduction} = useEnvironment();
const threedotRef = useRef<View>(null);
const [betas] = useOnyx(ONYXKEYS.BETAS);
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, {
canEvict: false,
});
const transactionID = ReportActionsUtils.getLinkedTransactionID(reportActionID, reportID);
Expand Down Expand Up @@ -179,8 +180,6 @@ function BaseReportActionContextMenu({
const areHoldRequirementsMet =
!isInvoiceReport && isMoneyRequestOrReport && !ReportUtils.isArchivedRoom(transactionThreadReportID ? childReport : parentReport, parentReportNameValuePairs);

const originalReportID = useMemo(() => ReportUtils.getOriginalReportID(reportID, reportAction), [reportID, reportAction]);

const shouldEnableArrowNavigation = !isMini && (isVisible || shouldKeepOpen);
let filteredContextMenuActions = ContextMenuActions.filter(
(contextAction) =>
Expand Down

0 comments on commit 5103b4b

Please sign in to comment.