fix error

This commit is contained in:
Cory LaViska
2023-12-07 14:57:53 -05:00
parent 0fe400c6f4
commit a67d1df89a

View File

@@ -99,7 +99,7 @@ module.exports = function (eleventyConfig) {
// Trims whitespace and pipes from the start and end of a string. Useful for CEM types, which can be pipe-delimited.
// With Prettier 3, this means a leading pipe will exist if the line wraps.
eleventyConfig.addFilter('trimPipes', content => {
return content.replace(/^(\s|\|)/g, '').replace(/(\s|\|)$/g, '');
return typeof content === 'string' ? content.replace(/^(\s|\|)/g, '').replace(/(\s|\|)$/g, '') : content;
});
eleventyConfig.addFilter('classNameToComponentName', className => {