Skip to content

Commit

Permalink
fix: default empty string for replace
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Dec 10, 2021
1 parent 821bd60 commit a86eceb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util/template/index.ts
Expand Up @@ -13,7 +13,8 @@ handlebars.registerHelper('stringToPrettyJSON', (input: string): string =>
// istanbul ignore next
handlebars.registerHelper(
'replace',
(find, replace, context) => context.replace(new RegExp(find, 'g'), replace) // TODO #12873
(find, replace, context) =>
(context || '').replace(new RegExp(find, 'g'), replace) // TODO #12873
);

export const exposedConfigOptions = [
Expand Down

0 comments on commit a86eceb

Please sign in to comment.