From 61fa9f3d241a63ef0881985185b988f8a1b781af Mon Sep 17 00:00:00 2001 From: erosman Date: Fri, 13 Oct 2023 14:58:46 +0330 Subject: [PATCH] Add files via upload --- src/content/sync.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/content/sync.js b/src/content/sync.js index 129adc6..168d147 100644 --- a/src/content/sync.js +++ b/src/content/sync.js @@ -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; }