1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Change to template literal

This commit is contained in:
asmsuechan
2017-05-04 10:15:22 -07:00
parent 9f383ba491
commit d24bcb7f86

View File

@@ -381,7 +381,7 @@ class NoteList extends React.Component {
} }
const targetIndex = _.findIndex(this.notes, (note) => { const targetIndex = _.findIndex(this.notes, (note) => {
return note != null && note.storage + '-' + note.key === location.query.key return note !== null && `${note.storage}-${note.key}` === location.query.key
}) })
const storageKey = this.notes[targetIndex].storage const storageKey = this.notes[targetIndex].storage
@@ -407,7 +407,7 @@ class NoteList extends React.Component {
}) })
hashHistory.push({ hashHistory.push({
pathname: location.pathname, pathname: location.pathname,
query: {key: note.storage + '-' + note.key} query: {key: `${note.storage}-${note.key}`}
}) })
}) })
}) })