Skip to content

Commit 876783f

Browse files
fix: Couple of Sentry errors using suggestions from static analysis (#102)
1 parent 863eecc commit 876783f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/content/github/file/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async function main(): Promise<void> {
6767
return;
6868
}
6969
globals.coverageButton = createCoverageButton();
70-
process(urlMetadata);
70+
await process(urlMetadata);
7171
} catch (e) {
7272
Sentry.captureException(e);
7373
throw e;

src/content/github/pr/main.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ async function execute() {
4747
createContainer();
4848

4949
const coverageReport = await getPRReport(urlMetadata);
50-
if (!coverageReport.files) {
50+
if (
51+
!coverageReport?.files ||
52+
!coverageReport?.totals?.base?.coverage ||
53+
!coverageReport?.totals?.head?.coverage ||
54+
!coverageReport?.totals?.patch?.coverage
55+
) {
5156
showError();
5257
return;
5358
}

0 commit comments

Comments
 (0)