0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

🐛 Fixed unsaved editor changes being lost when changing PSM data on a published post

This reverts commit c19f5b9c51.

The "fix" is not correct, we want to ensure that unsaved changes in the editor are always kept.
This commit is contained in:
Kevin Ansfield 2019-03-22 11:00:19 +00:00
parent 700d3587c3
commit 895cc7b647

View file

@ -190,19 +190,6 @@ export default Model.extend(Comparable, ValidationEngine, {
}
}),
save() {
// ensure that our scratch value used in the editor is kept in sync with
// what we get back from the API after saving - avoids issues which cause
// the editor to see a saved post as dirty and show a "are you sure" modal
return this._super(...arguments).then(() => {
if (JSON.stringify(this.mobiledoc) !== JSON.stringify(this.scratch)) {
this.set('scratch', this.mobiledoc);
}
return this;
});
},
_getPublishedAtBlogTZ() {
let publishedAtUTC = this.publishedAtUTC;
let publishedAtBlogDate = this.publishedAtBlogDate;