This commit is contained in:
2026-04-22 23:44:57 +08:00
parent 76ac9d22a5
commit 84dc92646a
484 changed files with 9598 additions and 9135 deletions

View File

@@ -98,8 +98,8 @@ export function normalizeTags(value: unknown, fallbackTags: string[] = []) {
].slice(0, 5);
}
export function clampText(value: string, maxLength: number) {
const normalized = value.trim().replace(/\s+/g, ' ');
export function clampText(value: unknown, maxLength: number) {
const normalized = toText(value).replace(/\s+/g, ' ');
if (!normalized) {
return '';
}