mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Make sure the first revision is seen as coming from emptiness, so it can be restored.
props adamsilverstein. fixes #23898. git-svn-id: https://develop.svn.wordpress.org/trunk@23872 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -424,19 +424,22 @@ window.wp = window.wp || {};
|
||||
// render the revisions
|
||||
render: function() {
|
||||
var addHtml = '';
|
||||
var thediff;
|
||||
// compare two revisions mode?
|
||||
|
||||
if ( 2 === REVAPP._compareOneOrTwo ) {
|
||||
|
||||
this.comparetwochecked = 'checked';
|
||||
if ( this.draggingLeft ) {
|
||||
if ( this.model.at( REVAPP._leftDiff ) ) {
|
||||
thediff = REVAPP._leftDiff -1;
|
||||
if ( this.model.at( thediff ) ) {
|
||||
addHtml = this.template( _.extend(
|
||||
this.model.at( REVAPP._leftDiff ).toJSON(),
|
||||
this.model.at( thediff ).toJSON(),
|
||||
{ comparetwochecked: this.comparetwochecked } // keep the checkmark checked
|
||||
) );
|
||||
}
|
||||
} else { // dragging right handle
|
||||
var thediff = REVAPP._rightDiff;
|
||||
thediff = REVAPP._rightDiff -1;
|
||||
if ( this.model.at( thediff ) ) {
|
||||
addHtml = this.template( _.extend(
|
||||
this.model.at( thediff ).toJSON(),
|
||||
|
||||
Reference in New Issue
Block a user