I've been trying to truncate text within a component and it works, sorta.
I am currently using the following code to truncate the text;
filters: {
truncate(string, value) {
return string.substring(0, value) + '…';
}
}
Then the truncate is called with the following line;
<p>{{ excerpt | truncate(77) }}</p>
I'm not sure why this is happening since the filter(truncate) and where it's being called is within the same component, then both of the pages being the root page and the other page calls the component the exact same way.
This seems to work for one page being the root page however, it doesn't work on other pages with displaying the following error;
