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() {