Skip to content

Commit

Permalink
Fix dirty checking
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jan 17, 2018
1 parent 3acae91 commit 92aab50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/components/unsaved-changes-warning/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class UnsavedChangesWarning extends Component {
warnIfUnsavedChanges( event ) {
const areMetaBoxesDirty = some( this.props.metaBoxes, ( metaBox, location ) => {
return metaBox.isActive &&
jQuery( getMetaBoxContainer( location ) ).serialize() !== metaBox.html;
jQuery( getMetaBoxContainer( location ) ).serialize() !== metaBox.data;
} );
if ( this.props.isDirty || areMetaBoxesDirty ) {
event.returnValue = __( 'You have unsaved changes. If you proceed, they will be lost.' );
Expand Down

0 comments on commit 92aab50

Please sign in to comment.