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

change let to const

This commit is contained in:
Razvan Moraru
2017-03-23 17:50:39 +01:00
parent 3b4921b848
commit 966ba06bc4

View File

@@ -251,10 +251,10 @@ class SnippetNoteDetail extends React.Component {
deleteSnippetByIndex (index) {
this.setState(() => {
let snippets = this.state.note.snippets.slice()
const snippets = this.state.note.snippets.slice()
snippets.splice(index, 1)
let note = Object.assign({}, this.state.note, {snippets})
let snippetIndex = this.state.snippetIndex >= snippets.length
const note = Object.assign({}, this.state.note, {snippets})
const snippetIndex = this.state.snippetIndex >= snippets.length
? snippets.length - 1
: this.state.snippetIndex