From b74acf6f6aef4e4241ba62c72ed8ddb21adc751d Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 17 Jun 2018 22:02:32 +0900 Subject: Use await/async on shared directory --- src/shared/versions/storage.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/shared/versions/storage.js') diff --git a/src/shared/versions/storage.js b/src/shared/versions/storage.js index 37603c8..7883258 100644 --- a/src/shared/versions/storage.js +++ b/src/shared/versions/storage.js @@ -1,7 +1,6 @@ -const load = () => { - return browser.storage.local.get('version').then(({ version }) => { - return version; - }); +const load = async() => { + let { version } = await browser.storage.local.get('version'); + return version; }; const save = (version) => { -- cgit v1.2.3