1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +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 () {
const { data, location, config } = this.props
let tagList = _.sortBy(data.tagNoteMap.map((tag, name) => {
return { name, size: tag.size }
}), ['name'])
let tagList = _.sortBy(data.tagNoteMap.map(
(tag, name) => ({name, size: tag.size})),
['name']
)
if (config.sortTagsBy === 'COUNTER') {
tagList = _.sortBy(tagList, function (item) {
return 0 - item.size
})
tagList = _.sortBy(tagList, item => (0 - item.size))
}
return (
tagList.map(tag => {