Skip to content

Commit 8a59ae4

Browse files
committed
fix: satisfy platform-ios crash diagnostics lint
1 parent 63b1513 commit 8a59ae4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/platform-ios/src/crash-diagnostics.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export const waitForCrashArtifact = async ({
336336
const deadline = Date.now() + CRASH_ARTIFACT_WAIT_TIMEOUT_MS;
337337
let fallbackArtifact = getFallbackArtifact();
338338

339-
do {
339+
while (Date.now() < deadline) {
340340
const artifacts = await collectCrashArtifacts(options);
341341

342342
for (const artifact of artifacts) {
@@ -362,5 +362,7 @@ export const waitForCrashArtifact = async ({
362362
await new Promise((resolve) =>
363363
setTimeout(resolve, CRASH_ARTIFACT_POLL_INTERVAL_MS),
364364
);
365-
} while (true);
365+
}
366+
367+
return getFallbackArtifact() ?? fallbackArtifact;
366368
};

0 commit comments

Comments
 (0)