mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Change for to some
This commit is contained in:
@@ -19,16 +19,14 @@ export function findNoteTitle (value) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (title == null) {
|
if (title == null) {
|
||||||
for (let i = 0; i < splitted.length; i++) {
|
title = ''
|
||||||
let trimmedLine = splitted[i].trim()
|
splitted.some((line, index) => {
|
||||||
|
let trimmedLine = splitted[index].trim()
|
||||||
if (trimmedLine.length > 0) {
|
if (trimmedLine.length > 0) {
|
||||||
title = trimmedLine
|
title = trimmedLine
|
||||||
break
|
return true
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
if (title == null) {
|
|
||||||
title = ''
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return title
|
return title
|
||||||
|
|||||||
Reference in New Issue
Block a user