From 5f4b0d9e64389a4359d9d4e6604db106ee05a7f0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 21 Nov 2014 04:17:04 -0500 Subject: [PATCH] fix(edit) could not save when diff disabled in options --- lib/client/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/edit.js b/lib/client/edit.js index a2a00954..c624ea60 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -354,7 +354,7 @@ var CloudCmd, Util, DOM, CloudFunc, io, ace, DiffProto, diff_match_patch, Zip, M exec.if(!isDiff, function(patch) { var query = '', MAX_SIZE = CloudFunc.MAX_FILE_SIZE, - patchLength = patch.length, + patchLength = patch && patch.length || 0, length = Value.length, isLessMaxLength = length < MAX_SIZE, isLessLength = isLessMaxLength && patchLength < length,