missing nullcheck.

This commit is contained in:
Claus
2017-06-30 10:46:44 +02:00
parent d5fd266b19
commit 44cfe5da84

View File

@@ -6,6 +6,9 @@
**/
angular.module("umbraco.filters").filter('preserveNewLineInHtml', function () {
return function (text) {
if (!text) {
return '';
}
return text.replace(/\n/g, '<br />');
};
});