Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
erosman authored Oct 13, 2023
1 parent 6deac61 commit 61fa9f3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/content/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ export class Sync {
browser.storage.sync.onChanged.addListener(e => this.onChanged(e));
}

static onChanged(changes) {
static async onChanged(changes) {
// no newValue on storage.local.clear()
if (!Object.values(changes)[0]?.hasOwnProperty('newValue')) { return; }

this.syncIn(changes);
}

static async syncIn(changes) {
const pref = await browser.storage.local.get();
if (!pref.sync) { return; }

Expand Down

0 comments on commit 61fa9f3

Please sign in to comment.