check undefined

This commit is contained in:
fyears
2021-11-08 09:37:51 +08:00
parent 2a49bb53b2
commit 5352c7b828
+3
View File
@@ -149,6 +149,9 @@ export const listFromRemote = async (
if (rsp.$metadata.httpStatusCode !== 200) {
throw Error("some thing bad while listing remote!");
}
if (rsp.Contents === undefined) {
break;
}
contents.push(...rsp.Contents);
isTruncated = rsp.IsTruncated;