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