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.


Built from https://develop.svn.wordpress.org/trunk@33066


git-svn-id: http://core.svn.wordpress.org/trunk@33037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2015-07-03 15:32:25 +00:00
parent 903a12530b
commit 2f383536fc
3 changed files with 9 additions and 5 deletions

View File

@ -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' );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta1-33065';
$wp_version = '4.3-beta1-33066';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.