From aed8c978d2350641a4554681858008491a19f860 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 5 Feb 2015 10:03:58 -0500 Subject: [PATCH] refactor(buffer) Util.json -> json --- lib/client/buffer.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/client/buffer.js b/lib/client/buffer.js index 7081fb74..4003a449 100644 --- a/lib/client/buffer.js +++ b/lib/client/buffer.js @@ -5,13 +5,14 @@ var Util, DOM; var DOMProto = Object.getPrototypeOf(DOM); - DOMProto.Buffer = new BufferProto(); + DOMProto.Buffer = new BufferProto(Util, DOM); - function BufferProto() { + function BufferProto(Util, DOM) { var Storage = DOM.Storage, Dialog = DOM.Dialog, Files = DOM.Files, Info = DOM.CurrentInfo, + json = Util.json, CLASS = 'cut-file', @@ -118,7 +119,7 @@ var Util, DOM; if (error) { DOM.Dialog.alert(error); } else if (cp) { - data = Util.json.parse(cp); + data = json.parse(cp); data.to = path; if (data.from === path) @@ -127,7 +128,7 @@ var Util, DOM; DOM.copyFiles(data); } else if (ct) { - data = Util.json.parse(ct); + data = json.parse(ct); data.to = path; if (data.from === path)