diff --git a/lib/compiler/plugins-loader.ts b/lib/compiler/plugins-loader.ts index 1dd2226d7..1dca86795 100644 --- a/lib/compiler/plugins-loader.ts +++ b/lib/compiler/plugins-loader.ts @@ -30,9 +30,7 @@ export interface MultiNestCompilerPlugins { export class PluginsLoader { public load(plugins: PluginEntry[] = []): MultiNestCompilerPlugins { const pluginNames = plugins.map((entry) => - entry !== null && typeof entry === 'object' - ? (entry as PluginAndOptions).name - : (entry as string), + entry ? (entry as PluginAndOptions)?.name : (entry as string) ); const nodeModulePaths = [ join(process.cwd(), 'node_modules'),