wp/wp-admin/js/edit-comments.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
  1223 	 * @return {boolean} Whether it is safe the continue with the intended action.
  1223 	 * @return {boolean} Whether it is safe the continue with the intended action.
  1224 	 */
  1224 	 */
  1225 	discardCommentChanges: function() {
  1225 	discardCommentChanges: function() {
  1226 		var editRow = $( '#replyrow' );
  1226 		var editRow = $( '#replyrow' );
  1227 
  1227 
  1228 		if  ( this.originalContent === $( '#replycontent', editRow ).val() ) {
  1228 		if  ( '' === $( '#replycontent', editRow ).val() || this.originalContent === $( '#replycontent', editRow ).val() ) {
  1229 			return true;
  1229 			return true;
  1230 		}
  1230 		}
  1231 
  1231 
  1232 		return window.confirm( __( 'Are you sure you want to do this?\nThe comment changes you made will be lost.' ) );
  1232 		return window.confirm( __( 'Are you sure you want to do this?\nThe comment changes you made will be lost.' ) );
  1233 	}
  1233 	}