1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +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) => { splitted.forEach((line, index) => {
let trimmedLine = line.trim() 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('```')) { if (trimmedLine.match('```')) {
isMarkdownInCode = !isMarkdownInCode isMarkdownInCode = !isMarkdownInCode
} else if (isMarkdownInCode === false && (trimmedLine.match(/^# +/) || trimmedNextLine.match('='))) { } else if (isMarkdownInCode === false && (trimmedLine.match(/^# +/) || trimmedNextLine.match('='))) {