Skip to content

Commit e8e92ba

Browse files
committed
fix: 🐛 support optional chaining
Closes: #488
1 parent 28833b8 commit e8e92ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/ngneat/transloco/src/lib/transloco.pipe.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export class TranslocoPipe implements PipeTransform, OnDestroy {
2929
) {}
3030

3131
// null is for handling strict mode + async pipe types https://github.com/ngneat/transloco/issues/311
32-
transform(key: string | null, params?: HashMap | undefined, inlineLang?: string | undefined): string {
32+
// null is for handling strict mode + optional chaining types https://github.com/ngneat/transloco/issues/488
33+
transform(key: string | null | undefined, params?: HashMap | undefined, inlineLang?: string | undefined): string {
3334
if (!key) {
3435
return key;
3536
}

0 commit comments

Comments
 (0)