Skip to content

Commit 74e68bc

Browse files
committed
fix(notification): only notify on major version update
1 parent 0e9a03c commit 74e68bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/scripts/background/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ try {
2323
try {
2424
onVersionUpdate(async details => {
2525
console.debug(`Extension updated`, details);
26+
const { previousVersion, nextVersion } = details;
27+
if (previousVersion?.split('.').slice(0, 2).join('.') === nextVersion?.split('.').slice(0, 2).join('.')) return;
2628
await storage.local.set(MessageType.VersionUpdate, { ...details, date: Date.now() });
2729
});
2830
} catch (error) {

0 commit comments

Comments
 (0)