From b8592d35c035c1f503d8c97aa0ccc0894ca8c0f0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 20 Aug 2019 18:47:11 +0300 Subject: [PATCH] fix(dom) getCurrentData --- client/dom/index.js | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/client/dom/index.js b/client/dom/index.js index 73f49317..6f506987 100644 --- a/client/dom/index.js +++ b/client/dom/index.js @@ -3,7 +3,6 @@ 'use strict'; const itype = require('itype/legacy'); -const exec = require('execon'); const jonny = require('jonny/legacy'); const tryToPromiseAll = require('../../common/try-to-promise-all'); @@ -340,7 +339,7 @@ function CmdProto() { const [hashNew, hash] = await DOM.checkStorageHash(path); if (hash === hashNew) - return await DOM.getDataFromStorage(path); + return await Storage.get(`${path}-data`); let [e, data] = await RESTful.read(path); @@ -563,29 +562,6 @@ function CmdProto() { return hash; }; - /** - * save data to storage - * - * @param name - * @param data - * @param callback - */ - this.getDataFromStorage = callbackify(async (name, callback) => { - const nameHash = name + '-hash'; - const nameData = name + '-data'; - const isDir = DOM.isCurrentIsDir(); - - if (isDir) - return exec(callback); - - const result = Promise.all([ - await Storage.get(nameData), - await Storage.get(nameHash), - ]); - - return result; - }); - this.getFM = () => { return DOM.getPanel().parentElement; };