summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-08-31 16:04:45 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-08-31 16:34:55 +0200
commit9efd565f749cac8e3f3340ce6909da73b948fb79 (patch)
tree7c1ea321b3558c0ddc2f97cbe23f628fef06c0cf /client/components/cards
parent72fe5fd47e92c7286e9adbb133de02f347eb4bd7 (diff)
downloadwekan-9efd565f749cac8e3f3340ce6909da73b948fb79.tar.gz
wekan-9efd565f749cac8e3f3340ce6909da73b948fb79.tar.bz2
wekan-9efd565f749cac8e3f3340ce6909da73b948fb79.zip
Don't save a draft if the card description hasn't been modified
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/cardDetails.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index caa5993f..5a7071e8 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -88,7 +88,10 @@ BlazeComponent.extendComponent({
close(isReset = false) {
if (this.isOpen.get() && ! isReset) {
- UnsavedEdits.set(this._getUnsavedEditKey(), this.getValue());
+ let draft = $.trim(this.getValue());
+ if (draft !== Cards.findOne(Session.get('currentCard')).description) {
+ UnsavedEdits.set(this._getUnsavedEditKey(), this.getValue());
+ }
}
super();
}