mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
fix from eslint
This commit is contained in:
@@ -948,13 +948,14 @@ class NoteList extends React.Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const viewType = this.getViewType()
|
const viewType = this.getViewType()
|
||||||
|
|
||||||
const autoSelectFirst = notes.length === 1
|
const autoSelectFirst =
|
||||||
|| selectedNoteKeys.length === 0
|
notes.length === 1 ||
|
||||||
|| notes.every( note => !selectedNoteKeys.includes(note.key))
|
selectedNoteKeys.length === 0 ||
|
||||||
|
notes.every(note => !selectedNoteKeys.includes(note.key))
|
||||||
|
|
||||||
const noteList = notes
|
const noteList = notes
|
||||||
.map( (note, index) => {
|
.map((note, index) => {
|
||||||
if (note == null) {
|
if (note == null) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -962,10 +963,10 @@ class NoteList extends React.Component {
|
|||||||
const isDefault = config.listStyle === 'DEFAULT'
|
const isDefault = config.listStyle === 'DEFAULT'
|
||||||
const uniqueKey = getNoteKey(note)
|
const uniqueKey = getNoteKey(note)
|
||||||
|
|
||||||
const isActive =
|
const isActive =
|
||||||
selectedNoteKeys.includes(uniqueKey)
|
selectedNoteKeys.includes(uniqueKey) ||
|
||||||
|| notes.length === 1
|
notes.length === 1 ||
|
||||||
|| (autoSelectFirst && index === 0)
|
(autoSelectFirst && index === 0)
|
||||||
const dateDisplay = moment(
|
const dateDisplay = moment(
|
||||||
config.sortBy === 'CREATED_AT'
|
config.sortBy === 'CREATED_AT'
|
||||||
? note.createdAt : note.updatedAt
|
? note.createdAt : note.updatedAt
|
||||||
|
|||||||
Reference in New Issue
Block a user