mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-09-13 18:59:25 +00:00
♻️ refactor: remove unused code
This commit is contained in:
@@ -5,6 +5,12 @@ export function getErrorMessage(error: unknown): string {
|
||||
if (typeof error === "string") {
|
||||
return error;
|
||||
}
|
||||
if (typeof error === "object" && error) {
|
||||
const value = "value" in error ? error.value : error;
|
||||
if (typeof value === "object" && value && "message" in value) {
|
||||
return String(value.message);
|
||||
}
|
||||
}
|
||||
return String(error);
|
||||
}
|
||||
export function getAge(timestamp: Date | string | undefined): string {
|
||||
|
||||
Reference in New Issue
Block a user