File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
core/app/core/src/lib/services/formatters/text Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export class TextFormatter implements Formatter {
6464
6565 do {
6666 previousValue = decodedValue ;
67- decodedValue = decodedValue . replace ( entityRegex , ( match ) => decodeMap [ match ] || match ) ;
67+ decodedValue = decodedValue ? .replace ( entityRegex , ( match ) => decodeMap [ match ] || match ) ;
6868 } while ( decodedValue !== previousValue ) ; // Repeat until no changes
6969
7070 return decodedValue ;
@@ -75,7 +75,7 @@ export class TextFormatter implements Formatter {
7575 * Decodes HTML special characters.
7676 */
7777 toInternalFormat ( value ) : string {
78- const formmatedValue = value . replace ( / [ < > & " ' \u00A0 - \uFFFF ] / g, ( match ) => {
78+ const formmatedValue = value ? .replace ( / [ < > & " ' \u00A0 - \uFFFF ] / g, ( match ) => {
7979 const encoded = this . defaultMap [ match ] ;
8080 return encoded !== undefined ? encoded : match ;
8181 } ) ;
You can’t perform that action at this time.
0 commit comments