diff --git a/src/scripts/vim.ts b/src/scripts/vim.ts index 180f330..d643257 100644 --- a/src/scripts/vim.ts +++ b/src/scripts/vim.ts @@ -222,7 +222,7 @@ window.addEventListener("keydown", (e) => { } // vim motion (j and k) - if (pathname == "/blogs") { + if (pathname == "/blogs" && blogs.length > 0) { // move the pointer if (e.key == "j") blogsPointer++; else if (e.key == "k") blogsPointer--;