Skip to content

Commit

Permalink
fix: slugifyAll typo
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhooks committed Feb 10, 2023
1 parent e74267f commit bcae985
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/utils/getPostsByTag.ts
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion src/utils/slugify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit bcae985

Please sign in to comment.