mirror of
https://github.com/Sevichecc/raycast-akkoma-extension.git
synced 2025-04-30 14:49:29 +08:00
fix: handle undefined value in Promise.all for mediaIds
This commit is contained in:
parent
1ce94ec7de
commit
af7cf9044d
1 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ export default function SimpleCommand(props: CommandProps) {
|
|||
value.files?.map(async (file) => {
|
||||
const { id } = await apiServer.uploadAttachment({ file, description: value.description });
|
||||
return id;
|
||||
})
|
||||
}) ?? []
|
||||
);
|
||||
|
||||
const newStatus: Partial<StatusRequest> = {
|
||||
|
@ -96,7 +96,7 @@ export default function SimpleCommand(props: CommandProps) {
|
|||
cw: "",
|
||||
}));
|
||||
cache.set("latest_published_status", JSON.stringify(response));
|
||||
setTimeout(() => popToRoot, 2000);
|
||||
setTimeout(() => popToRoot(), 2000);
|
||||
} catch (error) {
|
||||
const requestErr = error as AkkomaError;
|
||||
showToast(Toast.Style.Failure, "Error", requestErr.message);
|
||||
|
|
Loading…
Reference in a new issue