Customize: Make sure saved state is initially false when restoring autosave revision so that Save button will be enabled.

Amends [41597].
Props sayedwp.
See #39896.
Fixes #42143.


git-svn-id: https://develop.svn.wordpress.org/trunk@41826 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-10-11 05:56:40 +00:00
parent 06961964c4
commit 1c9c97fd02

View File

@ -7756,6 +7756,7 @@
}
if ( api.settings.changeset.autosaved ) {
api.state( 'saved' ).set( false );
stripParamsFromLocation( [ 'customize_autosaved' ] ); // Remove param when restoring autosave revision.
} else if ( ! api.settings.changeset.branching && 'auto-draft' === api.settings.changeset.status ) {
stripParamsFromLocation( [ 'changeset_uuid' ] ); // Remove UUID when restoring autosave auto-draft.