From 4e94561713521241ba625695ca9fc3752e73b5d9 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sat, 19 Oct 2024 20:13:12 -0700 Subject: [PATCH] chore: search cleanup --- package-lock.json | 4 ++-- package.json | 2 +- src/assets/scripts/index.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 431b3b68..772be5d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "1.5.12", + "version": "1.5.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "1.5.12", + "version": "1.5.13", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index af5bb102..0c2fc6d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "1.5.12", + "version": "1.5.13", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "engines": { diff --git a/src/assets/scripts/index.js b/src/assets/scripts/index.js index 7a7ffff0..fa5e1886 100644 --- a/src/assets/scripts/index.js +++ b/src/assets/scripts/index.js @@ -92,7 +92,7 @@ window.addEventListener("load", () => { // search logic (() => { - if (!MiniSearch || !document.querySelector(".search__form--input")) return; + if (typeof MiniSearch === "undefined") return; const miniSearch = new MiniSearch({ fields: ["title", "description", "tags", "type"], @@ -296,4 +296,4 @@ window.addEventListener("load", () => { updateSearchResults(nextResults); }); })(); -}); \ No newline at end of file +});