chore: reduce frontend lint warnings
Web Quality / verify (push) Has been cancelled

This commit is contained in:
2026-06-09 12:02:30 +08:00
parent f322679d4a
commit 4a298d205b
35 changed files with 82 additions and 158 deletions
@@ -106,7 +106,11 @@ function blobToDataUrl(blob: Blob): Promise<string> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = () => {
typeof reader.result === "string" ? resolve(reader.result) : reject(new Error("Unable to read canvas result"));
if (typeof reader.result === "string") {
resolve(reader.result);
} else {
reject(new Error("Unable to read canvas result"));
}
};
reader.onerror = () => reject(reader.error || new Error("Unable to read canvas result"));
reader.readAsDataURL(blob);