Skip to content

Commit c1d6059

Browse files
jt55401claude
andcommitted
fix(extension): badge clear must use a valid color, not empty string
Follow-up to 6e5f82a — that commit's edit to background/index.ts was lost. Apply the actual fix: replace setBadge("", "") with setBadge("", "#00000000") so Chrome's setBadgeBackgroundColor doesn't throw "The color specification could not be parsed." Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 6e5f82a commit c1d6059

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/background/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,11 +750,14 @@ async function updateBadge(): Promise<void> {
750750
// Get the verification status for the current URL
751751
const status = await getVerificationStatus(currentTab.url);
752752

753-
// Set the badge based on the verification status
753+
// Set the badge based on the verification status. Clearing the badge
754+
// means setting text to empty; color must still be a valid color string
755+
// because Chrome rejects an empty color spec ("The color specification
756+
// could not be parsed").
754757
if (status.verified) {
755758
await platformAdapter.setBadge("✓", "#4CAF50");
756759
} else {
757-
await platformAdapter.setBadge("", "");
760+
await platformAdapter.setBadge("", "#00000000");
758761
}
759762
} catch (error) {
760763
console.error("Failed to update badge:", error);

0 commit comments

Comments
 (0)