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

change from 'undefined' to undefined

This commit is contained in:
Sosuke Suzuki
2017-05-20 12:24:58 +09:00
parent 7265f76770
commit a528c99900

View File

@@ -69,7 +69,7 @@ class MarkdownNoteDetail extends React.Component {
splitted.forEach((line, index) => {
let trimmedLine = line.trim()
let trimmedNextLine = typeof splitted[index + 1] === 'undefined' ? '' : splitted[index + 1].trim()
let trimmedNextLine = splitted[index + 1] === undefined ? '' : splitted[index + 1].trim()
if (trimmedLine.match('```')) {
isMarkdownInCode = !isMarkdownInCode
} else if (isMarkdownInCode === false && (trimmedLine.match(/^# +/) || trimmedNextLine.match('='))) {