fix invalid date
This commit is contained in:
parent
0a349e1707
commit
b45fd5ce3a
1 changed files with 3 additions and 1 deletions
|
|
@ -21,7 +21,9 @@ function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>{`${pattern.id}: ${
|
<>{`${pattern.id}: ${
|
||||||
meta.title ?? pattern.hash ?? new Date(pattern.created_at).toLocaleDateString() ?? 'unnamed'
|
meta.title ?? pattern.hash ?? pattern.created_at != null
|
||||||
|
? new Date(pattern.created_at).toLocaleDateString()
|
||||||
|
: 'unnamed'
|
||||||
} by ${Array.isArray(meta.by) ? meta.by.join(',') : 'Anonymous'}`}</>
|
} by ${Array.isArray(meta.by) ? meta.by.join(',') : 'Anonymous'}`}</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue