mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
bugfix(core): add missing isSymbol check
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Type } from '@nestjs/common';
|
||||
import { isNil } from '@nestjs/common/utils/shared.utils';
|
||||
import { isNil, isSymbol } from '@nestjs/common/utils/shared.utils';
|
||||
import {
|
||||
InjectorDependency,
|
||||
InjectorDependencyContext,
|
||||
@@ -21,11 +21,13 @@ const getInstanceName = (instance: any) =>
|
||||
* @param dependency The dependency whichs name should get displayed
|
||||
*/
|
||||
const getDependencyName = (dependency: InjectorDependency) =>
|
||||
// Use class name
|
||||
// use class name
|
||||
getInstanceName(dependency) ||
|
||||
// Use injection token
|
||||
dependency && dependency.toString() ||
|
||||
// Don't know, don't care
|
||||
// use injection token (symbol)
|
||||
(isSymbol(dependency) && dependency.toString()) ||
|
||||
// use string directly
|
||||
dependency ||
|
||||
// otherwise
|
||||
'+';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user