1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

use arrow functions

This commit is contained in:
Sosuke Suzuki
2018-04-10 17:14:25 +09:00
parent d493df4295
commit 2c8f3b56ae

View File

@@ -145,13 +145,12 @@ class SideNav extends React.Component {
tagListComponent () { tagListComponent () {
const { data, location, config } = this.props const { data, location, config } = this.props
let tagList = _.sortBy(data.tagNoteMap.map((tag, name) => { let tagList = _.sortBy(data.tagNoteMap.map(
return { name, size: tag.size } (tag, name) => ({name, size: tag.size})),
}), ['name']) ['name']
)
if (config.sortTagsBy === 'COUNTER') { if (config.sortTagsBy === 'COUNTER') {
tagList = _.sortBy(tagList, function (item) { tagList = _.sortBy(tagList, item => (0 - item.size))
return 0 - item.size
})
} }
return ( return (
tagList.map(tag => { tagList.map(tag => {