From d3ccfe17e022ed9a2c13585b7ec587d82a60c758 Mon Sep 17 00:00:00 2001
From: Cory Dransfeldt <coryd@hey.com>
Date: Sat, 16 Mar 2024 20:41:01 -0700
Subject: [PATCH] fix: check for valid url to pass to web component

---
 config/filters/index.js | 2 +-
 package.json            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/filters/index.js b/config/filters/index.js
index 32fbed98..573ebd91 100644
--- a/config/filters/index.js
+++ b/config/filters/index.js
@@ -108,7 +108,7 @@ export default {
 
   // links
   findPost: (url, posts) => {
-    if (!url || !posts) return null;
+    if (!url || !posts || !posts[url]?.toots?.[0]?.includes('https')) return null;
     const BASE_URL = 'https://social.lol/users/cory/statuses/'
     const STATUS_URL = 'https://social.lol/@cory/'
     return posts[url]?.toots?.[0]?.replace(BASE_URL, STATUS_URL) || null;
diff --git a/package.json b/package.json
index 82df872a..b2b9378a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "coryd.dev",
-  "version": "7.10.8",
+  "version": "7.10.9",
   "description": "The source for my personal site. Built using 11ty.",
   "type": "module",
   "scripts": {