Skip to content

Commit

Permalink
browser storage
Browse files Browse the repository at this point in the history
  • Loading branch information
sanemat committed Jun 1, 2024
1 parent 8d7e1ff commit 2173d3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Define browser for cross-browser compatibility
var browser = (typeof browser !== 'undefined') ? browser : chrome;

function migrateLocalStorageToChromeStorage() {
function migrateLocalStorageToBrowserStorage() {
// Check if localStorage is not null and contains any keys
if (!localStorage || Object.keys(localStorage).length === 0) {
console.log('No localStorage data to migrate.');
Expand Down Expand Up @@ -34,7 +34,7 @@ browser.runtime.onInstalled.addListener(function (details) {
} else if (details.reason === 'update') {
console.log('previousVersion', details.previousVersion);
// Handle update logic
migrateLocalStorageToChromeStorage();
migrateLocalStorageToBrowserStorage();
}
});

Expand Down

0 comments on commit 2173d3f

Please sign in to comment.