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

fix from eslint

This commit is contained in:
Sosuke Suzuki
2018-06-12 19:33:54 +09:00
parent 2631cc3747
commit 9522a4d5d9

View File

@@ -949,9 +949,10 @@ class NoteList extends React.Component {
const viewType = this.getViewType()
const autoSelectFirst = notes.length === 1
|| selectedNoteKeys.length === 0
|| notes.every( note => !selectedNoteKeys.includes(note.key))
const autoSelectFirst =
notes.length === 1 ||
selectedNoteKeys.length === 0 ||
notes.every(note => !selectedNoteKeys.includes(note.key))
const noteList = notes
.map((note, index) => {
@@ -963,9 +964,9 @@ class NoteList extends React.Component {
const uniqueKey = getNoteKey(note)
const isActive =
selectedNoteKeys.includes(uniqueKey)
|| notes.length === 1
|| (autoSelectFirst && index === 0)
selectedNoteKeys.includes(uniqueKey) ||
notes.length === 1 ||
(autoSelectFirst && index === 0)
const dateDisplay = moment(
config.sortBy === 'CREATED_AT'
? note.createdAt : note.updatedAt