1
0
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:
asmsuechan
2017-05-23 15:43:48 +09:00
parent 908cd7a890
commit 005d8f84fd

View File

@@ -19,16 +19,14 @@ export function findNoteTitle (value) {
})
if (title == null) {
for (let i = 0; i < splitted.length; i++) {
let trimmedLine = splitted[i].trim()
title = ''
splitted.some((line, index) => {
let trimmedLine = splitted[index].trim()
if (trimmedLine.length > 0) {
title = trimmedLine
break
return true
}
}
if (title == null) {
title = ''
}
})
}
return title