From abb57c350dc8d248d23c1118731bbc013f0fe9fb Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Wed, 22 Dec 2021 22:01:28 +0200 Subject: [PATCH] FIX: Save draftSequence when it is 0 (#15394) The first draftSequence value is 0 and that was not recognized as a valid value by the client. --- app/assets/javascripts/discourse/app/models/composer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/models/composer.js b/app/assets/javascripts/discourse/app/models/composer.js index 058a0de31bb..aa249ebda44 100644 --- a/app/assets/javascripts/discourse/app/models/composer.js +++ b/app/assets/javascripts/discourse/app/models/composer.js @@ -1234,7 +1234,7 @@ const Composer = RestModel.extend({ { forceSave: this.draftForceSave } ) .then((result) => { - if (result.draft_sequence) { + if ("draft_sequence" in result) { this.set("draftSequence", result.draft_sequence); } if (result.conflict_user) {