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

Fix default value of config.sortBy

This commit is contained in:
Mika Andrianarijaona
2018-08-12 09:21:46 +02:00
parent cb956c5508
commit 9572cb2d33
4 changed files with 8 additions and 4 deletions

View File

@@ -912,7 +912,7 @@ class NoteList extends React.Component {
const { location, config, params: { folderKey } } = this.props
let { notes } = this.props
const { selectedNoteKeys } = this.state
const sortBy = _.get(config, [folderKey, 'sortBy'], config.sortBy)
const sortBy = _.get(config, [folderKey, 'sortBy'], config.sortBy.default)
const sortFunc = sortBy === 'CREATED_AT'
? sortByCreatedAt
: sortBy === 'ALPHABETICAL'