This commit is contained in:
tamaina 2021-02-13 02:29:29 +09:00
parent 758f1a0b53
commit 88ec710650
1 changed files with 3 additions and 2 deletions

View File

@ -131,8 +131,9 @@ export default defineComponent({
})(),(async () => {
const fileIds = urlParams.get('fileIds');
if (fileIds) {
const promises = Promise.all(fileIds.split(',').map(fileId => os.api('drive/files/show', { fileId })));
promises.then(files => this.files = files).catch(() => console.error('invalid fileIds'));
const promises = Promise.all(fileIds.split(',')
.map(fileId => os.api('drive/files/show', { fileId }).catch(() => console.error(`invalid fileId: ${fileId}`))));
await promises.then(files => this.files = files).catch(() => console.error('invalid fileIds'));
}
})(),]);