File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -125,15 +125,17 @@ export async function getResults(
125125
126126 // Only applied in bundle mode, a shortcut to get single entry result
127127 if ( libConfig . bundle !== false && fileSet . length ) {
128- let entryFile = '' ;
128+ let entryFile : string | undefined ;
129129 if ( fileSet . length === 1 ) {
130- entryFile = fileSet [ 0 ] ! ;
130+ entryFile = fileSet [ 0 ] ;
131131 } else {
132- entryFile = fileSet . find ( ( file ) => file . includes ( 'index' ) ) ! ;
132+ entryFile = fileSet . find ( ( file ) => file . includes ( 'index' ) ) ;
133133 }
134134
135- entries [ key ] = content [ entryFile ] ! ;
136- entryFiles [ key ] = normalize ( entryFile ) ;
135+ if ( typeof entryFile === 'string' ) {
136+ entries [ key ] = content [ entryFile ] ! ;
137+ entryFiles [ key ] = normalize ( entryFile ) ;
138+ }
137139 }
138140 }
139141
You can’t perform that action at this time.
0 commit comments