From fe71a734c0af4db7b8b9db3f9c648ce0df332112 Mon Sep 17 00:00:00 2001 From: Marco Weber Date: Wed, 9 Aug 2023 07:05:31 +0200 Subject: [PATCH] - resolved code smell --- src/decorators.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decorators.ts b/src/decorators.ts index febe2be..21b0268 100644 --- a/src/decorators.ts +++ b/src/decorators.ts @@ -12,7 +12,7 @@ export function inject(serviceIdOrTarget: Object | string, propertyKey?: string) function redefineObject(target: Object, propertyKey: string, serviceId?: string) { function get() { - return ServiceContainer.get(serviceId?.toLowerCase() || propertyKey.toLowerCase()); + return ServiceContainer.get(serviceId?.toLowerCase() ?? propertyKey.toLowerCase()); } function set() {