Skip to content

Commit

Permalink
chore: add conditional to prevent state migration error
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgabrielgsp committed Oct 11, 2024
1 parent a5fe1d4 commit b673703
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/scripts/Background/controllers/MigrationController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ const MigrationController = async () => {
const state = await loadState(); // get state from Storage API
const currentPaliVersion = paliData.version;

if (!state) {
console.warn('<MigrationController> No state found in chrome storage');
return;
}

/**
* version < 3.0.1
* Description: Example of migration from version 3.0.0 to 3.0.1
Expand Down

0 comments on commit b673703

Please sign in to comment.