Skip to content

Commit

Permalink
Merge branch 'notifier-tests-improvements' of https://github.com/code…
Browse files Browse the repository at this point in the history
…x-team/hawk.workers into notifier-tests-improvements
  • Loading branch information
e11sy committed Feb 2, 2025
2 parents c5266b7 + 8d9083b commit 1d7e0b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions workers/email/src/templates/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ Twig.extendFilter('prettyPath', (value = ''): string => {
* @param {number} maxLen - max length of string
* @returns {string}
*/
Twig.extendFilter('leftTrim', (value: string, maxLen: number): string => {
Twig.extendFilter('leftTrim', ((value: string, maxLen: number): string => {
if (value.length > maxLen) {
return '…' + value.slice(value.length - maxLen);
}

return value;
});
}) as unknown as (value: any, params: false | any[]) => string); // tmp case. We need to check if TS says correct types or our implementation is correct

/**
* Prettify time to show in 'DD days HH hours MM minutes"
Expand Down

0 comments on commit 1d7e0b2

Please sign in to comment.