File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
compiler/packages/babel-plugin-react-compiler/src Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ export class CompilerError extends Error {
188188 constructor ( ...args : Array < any > ) {
189189 super ( ...args ) ;
190190 this . name = 'ReactCompilerError' ;
191+ this . details = [ ] ;
191192 }
192193
193194 override get message ( ) : string {
@@ -197,7 +198,10 @@ export class CompilerError extends Error {
197198 override set message ( _message : string ) { }
198199
199200 override toString ( ) : string {
200- return this . details . map ( detail => detail . toString ( ) ) . join ( '\n\n' ) ;
201+ if ( Array . isArray ( this . details ) ) {
202+ return this . details . map ( detail => detail . toString ( ) ) . join ( '\n\n' ) ;
203+ }
204+ return this . name ;
201205 }
202206
203207 push ( options : CompilerErrorDetailOptions ) : CompilerErrorDetail {
You can’t perform that action at this time.
0 commit comments