Skip to content

Commit afefc04

Browse files
authored
Merge pull request #263 from underctrl-io/plugin-fix
fix: add plugin filter
2 parents a5d6782 + f94cd65 commit afefc04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/commandkit/src/plugins/plugin-runtime/CompilerPluginRuntime.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
MaybeFalsey,
44
TransformedResult,
55
TemplateHandler,
6+
isCompilerPlugin,
67
} from '..';
78
import { AsyncLocalStorage } from 'node:async_hooks';
89

@@ -49,7 +50,9 @@ export class CompilerPluginRuntime {
4950
* Creates a new instance of CompilerPluginRuntime.
5051
* @param plugins An array of compiler plugins to be managed by this runtime.
5152
*/
52-
public constructor(private readonly plugins: CompilerPlugin[]) {}
53+
public constructor(private readonly plugins: CompilerPlugin[]) {
54+
this.plugins = this.plugins.filter((p) => !!p && isCompilerPlugin(p));
55+
}
5356

5457
/**
5558
* Returns the plugins managed by this runtime.

0 commit comments

Comments
 (0)