test: avatar and header uploading
This commit is contained in:
parent
8736560e5f
commit
b57ec5e2eb
3 changed files with 53 additions and 4 deletions
|
|
@ -142,3 +142,7 @@ export function toArray<T>(x: T | T[] | undefined): T[] {
|
|||
export function toSingle<T>(x: T | T[] | undefined): T | undefined {
|
||||
return Array.isArray(x) ? x[0] : x;
|
||||
}
|
||||
|
||||
export function toSingleLast<T>(x: T | T[] | undefined): T | undefined {
|
||||
return Array.isArray(x) ? x.at(-1) : x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue