summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Branca <chewbranca@gmail.com>2013-03-13 15:15:02 -0700
committerRussell Branca <chewbranca@gmail.com>2013-03-13 15:15:20 -0700
commit53a24652061325bb4ba7944499472e9dbd116494 (patch)
tree2b180148a57efc39f5d7c7cb0cc9872f37a07c7c
parent0d08a755880586cfcb23f0240b57ff8a6a5ba858 (diff)
downloadcouchdb-53a24652061325bb4ba7944499472e9dbd116494.tar.gz
Fix code editor to save deleted fields
-rw-r--r--src/fauxton/app/modules/documents/views.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 9b4bb7181..6f370cc73 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -537,6 +537,7 @@ function(app, FauxtonAPI, Codemirror, JSHint) {
var json, notification;
if (this.hasValidCode()) {
json = JSON.parse(this.editor.getValue());
+ this.model.clear({silent:true});
this.model.set(json);
notification = FauxtonAPI.addNotification({msg: "Saving document."});
this.model.save().error(function(xhr) {