diff --git a/assets/components/LogViewer/LogViewer.vue b/assets/components/LogViewer/LogViewer.vue index a0abd01f..52384204 100644 --- a/assets/components/LogViewer/LogViewer.vue +++ b/assets/components/LogViewer/LogViewer.vue @@ -58,7 +58,9 @@ const routeHash = useRouteHash(); watch( routeHash, (hash) => { - document.querySelector(`[data-key="${hash.substring(1)}"]`)?.scrollIntoView({ block: "center" }); + if(hash){ + document.querySelector(`[data-key="${hash.substring(1)}"]`)?.scrollIntoView({ block: "center" }); + } }, { immediate: true, flush: "post" } );