Fixed save button not appearing on title changes

no issue

- the title comparison in the editor's `hasDirtyAttributes` CP was comparing properties on the wrong object so never returned `true` when the title was changed
This commit is contained in:
Kevin Ansfield 2022-05-18 09:25:27 +01:00
parent c16bc682cf
commit a7d7c4bf6d

View File

@ -971,8 +971,8 @@ export default class EditorController extends Controller {
} }
// titleScratch isn't an attr so needs a manual dirty check // titleScratch isn't an attr so needs a manual dirty check
if (this.titleScratch !== this.title) { if (post.titleScratch !== post.title) {
this._leaveModalReason = {reason: 'title is different', context: {current: this.title, scratch: this.titleScratch}}; this._leaveModalReason = {reason: 'title is different', context: {current: post.title, scratch: post.titleScratch}};
return true; return true;
} }