From bcae9856712773887664bb3a3392e1ebfd78607b Mon Sep 17 00:00:00 2001 From: John Hooks Date: Fri, 10 Feb 2023 05:26:55 -0800 Subject: [PATCH] fix: slugifyAll typo --- src/utils/getPostsByTag.ts | 4 ++-- src/utils/slugify.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/getPostsByTag.ts b/src/utils/getPostsByTag.ts index ed59eedaa..d9c871154 100644 --- a/src/utils/getPostsByTag.ts +++ b/src/utils/getPostsByTag.ts @@ -1,7 +1,7 @@ -import { slufigyAll } from "./slugify"; +import { slugifyAll } from "./slugify"; import type { CollectionEntry } from "astro:content"; const getPostsByTag = (posts: CollectionEntry<"blog">[], tag: string) => - posts.filter(post => slufigyAll(post.data.tags).includes(tag)); + posts.filter(post => slugifyAll(post.data.tags).includes(tag)); export default getPostsByTag; diff --git a/src/utils/slugify.ts b/src/utils/slugify.ts index 55b726b94..31f212b90 100644 --- a/src/utils/slugify.ts +++ b/src/utils/slugify.ts @@ -6,6 +6,6 @@ export const slugifyStr = (str: string) => slugger(str); const slugify = (post: BlogFrontmatter) => post.postSlug ? slugger(post.postSlug) : slugger(post.title); -export const slufigyAll = (arr: string[]) => arr.map(str => slugifyStr(str)); +export const slugifyAll = (arr: string[]) => arr.map(str => slugifyStr(str)); export default slugify;