Don't save a draft if the card description hasn't been modified

This commit is contained in:
Maxime Quandalle 2015-08-31 16:04:45 +02:00
parent 72fe5fd47e
commit 9efd565f74

View file

@ -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();
}