diff --git a/src/index.tsx b/src/index.tsx index 6135cf3f..310ae2a3 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -36,17 +36,17 @@ render( [stage 1] - signup? - import videos - - import graffiti - text post can also has songs http://vault48.org/post5052 - fulltext search: https://github.com/typeorm/typeorm/issues/3191 - zoom: https://manuelstofer.github.io/pinchzoom/ - + - notifications (node, comment) - + - social integration (assimilate) - comment editing - + Done: + - import graffiti - <...> format - youtube embeds - mobile header diff --git a/src/utils/dom.ts b/src/utils/dom.ts index e1e48bfd..f1fb64f2 100644 --- a/src/utils/dom.ts +++ b/src/utils/dom.ts @@ -100,10 +100,12 @@ export const formatText = (text: string): string => .join('\n'); export const formatTextParagraphs = (text: string): string => - text - .split('\n') - .map(str => `

${str}

`) - .join('\n'); + (text && + text + .split('\n') + .map(str => `

${str}

`) + .join('\n')) || + null; export const findBlockType = (line: string): ValueOf => { const match = Object.values(COMMENT_BLOCK_DETECTORS).find(detector => line.match(detector.test));