From 302b7fa13e3470997863132c7c6ff7266dabd80f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 23 Jan 2015 08:05:58 -0500 Subject: [PATCH] refactor(edward) Diff -> daffy --- lib/client/edward.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/client/edward.js b/lib/client/edward.js index 93d7fffe..a0670918 100644 --- a/lib/client/edward.js +++ b/lib/client/edward.js @@ -1,4 +1,4 @@ -var join, ace, load, Util, DOM, Diff, io, Format, restafary; +var join, ace, load, Util, DOM, io, daffy, Format, restafary; (function(global, join, DOM, exec, loadRemote) { 'use strict'; @@ -357,7 +357,7 @@ var join, ace, load, Util, DOM, Diff, io, Format, restafary; alert(error); } else { exec.if(!isAllowed, function() { - patch = Diff.createPatch(Value, newValue); + patch = daffy.createPatch(Value, newValue); exec(callback, patch); }, function(func) { DOM.getDataFromStorage(FileName, function(error, data) { @@ -379,12 +379,7 @@ var join, ace, load, Util, DOM, Diff, io, Format, restafary; return DIR + name; })); - DOM.load.js(url, function(error) { - if (!error && !Diff) - Diff = window.daffy; - - callback(error); - }); + DOM.load.js(url, callback); } function zip(value, callback) { @@ -494,7 +489,7 @@ var join, ace, load, Util, DOM, Diff, io, Format, restafary; if (hash === hashLocal) { cursor = edward.getCursor(), value = edward.getValue(); - value = Diff.applyPatch(value, data); + value = daffy.applyPatch(value, data); edward.setValue(value);