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

to short an arrow function

This commit is contained in:
Sosuke Suzuki
2018-04-10 18:40:57 +09:00
parent 145ae10a79
commit 0d53f799b7

View File

@@ -19,9 +19,7 @@ function findByWordOrTag (notes, block) {
const tagRegExp = new RegExp(_.escapeRegExp(tag), 'i') const tagRegExp = new RegExp(_.escapeRegExp(tag), 'i')
const wordRegExp = new RegExp(_.escapeRegExp(block), 'i') const wordRegExp = new RegExp(_.escapeRegExp(block), 'i')
return notes.filter((note) => { return notes.filter((note) => {
if (_.isArray(note.tags) && note.tags.some((_tag) => { if (_.isArray(note.tags) && note.tags.some((_tag) => _tag.match(tagRegExp))) {
return _tag.match(tagRegExp)
})) {
return true return true
} }
if (note.type === 'SNIPPET_NOTE') { if (note.type === 'SNIPPET_NOTE') {