Check if commentReply
exists before trying to work with it.
Fixes a bug that caused the save/publish flow to be interrupted by an AYS. Introduced in [33024]. See #29457. git-svn-id: https://develop.svn.wordpress.org/trunk@33066 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3baf370b28
commit
04a01d7354
@ -266,9 +266,13 @@ jQuery(document).ready( function($) {
|
||||
wp.autosave.server.suspend();
|
||||
}
|
||||
|
||||
// Close the comment edit/reply form if open to stop the form
|
||||
// action from interfering with the post's form action.
|
||||
commentReply.close();
|
||||
if ( typeof commentReply !== 'undefined' ) {
|
||||
/*
|
||||
* Close the comment edit/reply form if open to stop the form
|
||||
* action from interfering with the post's form action.
|
||||
*/
|
||||
commentReply.close();
|
||||
}
|
||||
|
||||
releaseLock = false;
|
||||
$(window).off( 'beforeunload.edit-post' );
|
||||
|
Loading…
Reference in New Issue
Block a user