mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 18:56:22 +00:00
Code style: remove redundant brackets from lambda expression
This commit is contained in:
@@ -268,7 +268,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
|
|
||||||
handleGenerateToc () {
|
handleGenerateToc () {
|
||||||
markdownToc.generate(this.refs.content.value,
|
markdownToc.generate(this.refs.content.value,
|
||||||
(modifiedValue) => { this.refs.content.refs.code.setValue(modifiedValue) })
|
(modifiedValue) => this.refs.content.refs.code.setValue(modifiedValue))
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFocus (e) {
|
handleFocus (e) {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class SnippetNoteDetail extends React.Component {
|
|||||||
if (currentMode.includes('Markdown')) {
|
if (currentMode.includes('Markdown')) {
|
||||||
const currentValue = this.refs['code-' + this.state.snippetIndex].value
|
const currentValue = this.refs['code-' + this.state.snippetIndex].value
|
||||||
const currentEditor = this.refs['code-' + this.state.snippetIndex].refs.code.editor
|
const currentEditor = this.refs['code-' + this.state.snippetIndex].refs.code.editor
|
||||||
markdownToc.generate(currentValue, (modifiedValue) => { currentEditor.setValue(modifiedValue) })
|
markdownToc.generate(currentValue, (modifiedValue) => currentEditor.setValue(modifiedValue))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user