mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-23 02:31:33 +08:00
feat: update homepage
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { defineCollection, z } from 'astro:content'
|
||||
|
||||
function removeDupsAndLowerCase(array: string[]) {
|
||||
if (!array.length) return array
|
||||
function removeDupsAndLowerCase(array: string[] | null) {
|
||||
if (!array?.length) return []
|
||||
const lowercaseItems = array.map((str) => str.toLowerCase())
|
||||
const distinctItems = new Set(lowercaseItems)
|
||||
return Array.from(distinctItems)
|
||||
|
Reference in New Issue
Block a user