Skip to content

Commit

Permalink
Update click-elements.ts
Browse files Browse the repository at this point in the history
If the history is empty because of a navigation (for example: clicking a link - <a href=...>), then this prevents an empty state to cause an exception on line 549 in the same function.
  • Loading branch information
Gilc83 authored Jan 6, 2025
1 parent f912b8b commit 5397354
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ async function restoreHistoryNavigationAndSaveCapturedUrls(page: Page, requests:
const { stateHistory } = window.history as unknown as ApifyWindow;
(window as unknown as Dictionary).history = (window as unknown as Dictionary).__originalHistory__;
return stateHistory;
});
}) ?? [];

state.forEach((args) => {
try {
Expand Down

0 comments on commit 5397354

Please sign in to comment.