From 55488ae292f00ddf5c73b54c5565ede502bb3730 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 9 Jun 2018 11:37:41 +0300 Subject: [PATCH] fix(dom) saveDataToStorage, getDataFromStorage: localStorage option check (#177) --- client/dom/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/dom/index.js b/client/dom/index.js index e76f5524..22d82a3c 100644 --- a/client/dom/index.js +++ b/client/dom/index.js @@ -582,12 +582,11 @@ function CmdProto() { * @param callback */ this.saveDataToStorage = function(name, data, hash, callback) { - const allowed = CloudCmd.config('localStorage'); const isDir = DOM.isCurrentIsDir(); const nameHash = name + '-hash'; const nameData = name + '-data'; - if (!allowed || isDir) + if (isDir) return exec(callback); exec.if(hash, () => { @@ -613,10 +612,9 @@ function CmdProto() { this.getDataFromStorage = (name, callback) => { const nameHash = name + '-hash'; const nameData = name + '-data'; - const allowed = CloudCmd.config('localStorage'); const isDir = DOM.isCurrentIsDir(); - if (!allowed || isDir) + if (isDir) return exec(callback); exec.parallel([