Skip to content

Commit e8ec438

Browse files
committed
fix(OUT-2541): used replaceAll instead of replace removing the g flag
1 parent 37ac0c7 commit e8ec438

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/safeCompile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Handlebars, { TemplateDelegate } from 'handlebars'
66
* Missing properties resolve to empty string.
77
*/
88
export const safeCompile = (templateSource: string): TemplateDelegate => {
9-
const sanitizedTemplate = templateSource.replace(/{{\s*[\w]+\.\s*}}/g, '') // Remove placeholders ending with a dot
9+
const sanitizedTemplate = templateSource.replaceAll(/{{\s*[\w]+\.\s*}}/, '') // Remove placeholders ending with a dot
1010

1111
Handlebars.registerHelper('helperMissing', () => '')
1212

0 commit comments

Comments
 (0)