Skip to content

Commit bdde376

Browse files
committed
use else if for hashParams check logic
1 parent 0ba1cf1 commit bdde376

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/components/AppController.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,17 +229,16 @@ const AppController = ({children}: AppControllerProps) => {
229229
if (URL_SEARCH_PARAMS_DEFAULT.filePath !== searchParams.filePath) {
230230
let cursor: CursorType = {code: CURSOR_CODE.LAST_EVENT, args: null};
231231

232-
if (URL_HASH_PARAMS_DEFAULT.logEventNum !== hashParams.logEventNum) {
233-
cursor = {
234-
code: CURSOR_CODE.EVENT_NUM,
235-
args: {eventNum: hashParams.logEventNum},
236-
};
237-
}
238232
if (URL_HASH_PARAMS_DEFAULT.timestamp !== hashParams.timestamp) {
239233
cursor = {
240234
code: CURSOR_CODE.TIMESTAMP,
241235
args: {timestamp: hashParams.timestamp},
242236
};
237+
} else if (URL_HASH_PARAMS_DEFAULT.logEventNum !== hashParams.logEventNum) {
238+
cursor = {
239+
code: CURSOR_CODE.EVENT_NUM,
240+
args: {eventNum: hashParams.logEventNum},
241+
};
243242
}
244243
const {loadFile} = useLogFileStore.getState();
245244
loadFile(searchParams.filePath, cursor);

0 commit comments

Comments
 (0)