Skip to content

Commit 208bbd2

Browse files
committed
fix bug
1 parent 218169c commit 208bbd2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/EmailBodyTabs.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ export default function EmailBodyTabs({ email }: { email: Email }) {
1616

1717
let spamScoreClasses = 'text-green-500';
1818

19-
if (spamScore > 0 && spamScore < 5) {
20-
spamScoreClasses = 'text-yellow-500';
21-
} else if (spamScore >= 5) {
22-
spamScoreClasses = 'text-red-500';
19+
if (spamScore !== undefined) {
20+
if (spamScore > 0 && spamScore < 5) {
21+
spamScoreClasses = 'text-yellow-500';
22+
} else if (spamScore >= 5) {
23+
spamScoreClasses = 'text-red-500';
24+
}
2325
}
2426

2527
async function openInBrowser(browserName: 'google chrome' | 'firefox') {

0 commit comments

Comments
 (0)