1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

change from forEach to some

This commit is contained in:
Sosuke Suzuki
2017-05-20 12:28:11 +09:00
parent a528c99900
commit 575f1b4b33

View File

@@ -67,7 +67,7 @@ class MarkdownNoteDetail extends React.Component {
let title = null
let isMarkdownInCode = false
splitted.forEach((line, index) => {
splitted.some((line, index) => {
let trimmedLine = line.trim()
let trimmedNextLine = splitted[index + 1] === undefined ? '' : splitted[index + 1].trim()
if (trimmedLine.match('```')) {
@@ -78,7 +78,7 @@ class MarkdownNoteDetail extends React.Component {
} else {
title = trimmedLine.substring(1, trimmedLine.length).trim()
}
return
return true
}
})