1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Add isEqual and changing haveToSaveNotif method

This commit is contained in:
Paul Rosset
2017-12-14 12:26:05 +00:00
parent cb59458c79
commit 795fe8ae1d
3 changed files with 5 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ class UiTab extends React.Component {
this.setState({ config: newConfig, codemirrorTheme: newCodemirrorTheme }, () => {
const {ui, editor, preview} = this.props.config
this.currentConfig = {ui, editor, preview}
if (JSON.stringify(this.currentConfig) === JSON.stringify(this.state.config)) {
if (_.isEqual(this.currentConfig, this.state.config)) {
this.props.haveToSave()
} else {
this.props.haveToSave({