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:
@@ -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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user