mirror of
https://git.joinfirefish.org/firefish/firefish.git
synced 2024-05-19 05:31:11 +02:00
chore (client): fix type errors
This commit is contained in:
parent
fbdc068115
commit
9a4988eaad
|
@ -1046,14 +1046,14 @@ function openFileDescriptionWindow(file: entities.DriveFile) {
|
||||||
resolve(false);
|
resolve(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const comment = result.result.length === 0 ? null : result.result;
|
const comment = result.result?.length === 0 ? null : result.result;
|
||||||
os.api("drive/files/update", {
|
os.api("drive/files/update", {
|
||||||
fileId: file.id,
|
fileId: file.id,
|
||||||
comment,
|
comment,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
resolve(true);
|
resolve(true);
|
||||||
file.comment = comment;
|
file.comment = comment ?? null;
|
||||||
})
|
})
|
||||||
.catch((err: unknown) => {
|
.catch((err: unknown) => {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
|
Loading…
Reference in a new issue