From 2925c0d5cd9b9aaf86f23beac3775e7949541e69 Mon Sep 17 00:00:00 2001 From: Paul Rangger Date: Wed, 27 Nov 2024 23:03:10 +0100 Subject: [PATCH] Extend comment for constructor --- src/main/webapp/app/shared/pipes/artemis-translate.pipe.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/shared/pipes/artemis-translate.pipe.ts b/src/main/webapp/app/shared/pipes/artemis-translate.pipe.ts index 09ad55705b29..10a216f58635 100644 --- a/src/main/webapp/app/shared/pipes/artemis-translate.pipe.ts +++ b/src/main/webapp/app/shared/pipes/artemis-translate.pipe.ts @@ -12,7 +12,11 @@ import { TranslatePipe, TranslateService } from '@ngx-translate/core'; export class ArtemisTranslatePipe implements PipeTransform, OnDestroy { private translatePipe: TranslatePipe; - // We cannot inject() ChangeDetectorRef here + /** + * We cannot inject() ChangeDetectorRef here, since this is a pipe (other than a component where its possible) + * However, in this case due to being a wrapper class for TranslatePipe, which implements the same constructor + * this exception should be okay. + */ constructor(translateService: TranslateService, changeDetectorRef: ChangeDetectorRef) { this.translatePipe = new TranslatePipe(translateService, changeDetectorRef); }