Skip to content

Commit

Permalink
Remove unreachable code in cursor navigation function.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Oct 3, 2024
1 parent 76f497f commit b9397a8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions new-log-viewer/src/contexts/StateContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,6 @@ const getPageNumCursor = (
currentPageNum: number,
numPages: number
): Nullable<CursorType> => {
if (STATE_DEFAULT.pageNum === currentPageNum) {
// eslint-disable-next-line no-warning-comments
// TODO: This shouldn't be possible, but currently, the page nav buttons remain enabled
// even when a file hasn't been loaded.
console.error("Page actions cannot be executed if the current page is not set.");

return null;
}

let newPageNum: number;
let position: EVENT_POSITION_ON_PAGE;
switch (navAction.code) {
Expand Down

0 comments on commit b9397a8

Please sign in to comment.