diff options
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/text_formatting.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx index a9e33513c..7f6101e36 100644 --- a/webapp/utils/text_formatting.jsx +++ b/webapp/utils/text_formatting.jsx @@ -30,6 +30,10 @@ const cjkPattern = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00- // links to the relevant channel. // - team - The current team. export function formatText(text, inputOptions) { + if (!text || typeof text !== 'string') { + return ''; + } + let output = text; const options = Object.assign({}, inputOptions); |