1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 02:36:36 +00:00

Fix a bug which cannot read a property when moves to other folder on locking

This commit is contained in:
asmsuechan
2017-03-19 00:41:55 -07:00
parent f3ed22dd51
commit 91f24d96b9
2 changed files with 7 additions and 6 deletions

View File

@@ -230,8 +230,9 @@ class MarkdownNoteDetail extends React.Component {
if (e.keyCode === 27) this.handleDeleteCancelButtonClick(e)
}
handleToggleLockButton () {
if (this.props.config.editor.switchPreview === 'BLUR' && this.refs.content.state.status === 'CODE') {
handleToggleLockButton (event, noteStatus) {
// first argument event is not used
if (this.props.config.editor.switchPreview === 'BLUR' && noteStatus === 'CODE') {
this.setState({isLockButtonShown: true})
} else {
this.setState({isLockButtonShown: false})