From 30be394ace0bde4767a63002830a03ab828c69b3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Nov 2013 11:16:20 +0000 Subject: [PATCH] refactor(diff) applyPatch --- lib/diff.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/diff.js b/lib/diff.js index b0e44ecf..21ed339c 100644 --- a/lib/diff.js +++ b/lib/diff.js @@ -12,9 +12,10 @@ this.applyPatch = function(oldText, patch) { var patches = dmp.patch_fromText(patch), - results = dmp.patch_apply(patches, oldText)[0]; + result = dmp.patch_apply(patches, oldText); + newText = result[0]; - return results; + return newText; }; }; })(this);