From b9397a8dc734ce6768ab3861a391afd89785faab Mon Sep 17 00:00:00 2001 From: Junhao Liao Date: Thu, 3 Oct 2024 17:28:16 +0800 Subject: [PATCH] Remove unreachable code in cursor navigation function. --- new-log-viewer/src/contexts/StateContextProvider.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/new-log-viewer/src/contexts/StateContextProvider.tsx b/new-log-viewer/src/contexts/StateContextProvider.tsx index d3d9a853..c93e7e07 100644 --- a/new-log-viewer/src/contexts/StateContextProvider.tsx +++ b/new-log-viewer/src/contexts/StateContextProvider.tsx @@ -113,15 +113,6 @@ const getPageNumCursor = ( currentPageNum: number, numPages: number ): Nullable => { - 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) {