chore (client): fix type errors

This commit is contained in:
naskya 2024-04-22 07:14:56 +09:00
parent fbdc068115
commit 9a4988eaad
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -1046,14 +1046,14 @@ function openFileDescriptionWindow(file: entities.DriveFile) {
resolve(false);
return;
}
const comment = result.result.length === 0 ? null : result.result;
const comment = result.result?.length === 0 ? null : result.result;
os.api("drive/files/update", {
fileId: file.id,
comment,
})
.then(() => {
resolve(true);
file.comment = comment;
file.comment = comment ?? null;
})
.catch((err: unknown) => {
reject(err);