1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

fix bug: check text is exist in breakFilter

This commit is contained in:
Peng DU 2016-07-14 11:26:03 +02:00
parent 91f4694175
commit 503e8fc95f

View File

@ -103,7 +103,7 @@ Application.Filters.filter "humanize", [ ->
##
Application.Filters.filter "breakFilter", [ ->
(text) ->
if text != undefined
if text?
text.replace(/\n+/g, '<br />')
]
@ -232,4 +232,4 @@ Application.Filters.filter 'toIsoDate', [ ->
return date unless (date instanceof Date || moment.isMoment(date))
moment(date).format('YYYY-MM-DD')
]
]