File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -326,15 +326,19 @@ export function parseOptions(
326326 for ( const key of allKeys ) {
327327 const values = [ ] ;
328328 if ( objectOptions . has ( key ) ) {
329- const options = [ objectOptions . get ( key ) ] . flat ( ) ;
329+ const options = Array . isArray ( objectOptions . get ( key ) )
330+ ? objectOptions . get ( key )
331+ : [ objectOptions . get ( key ) ] ;
330332 values . push ( ...options ) ;
331333 }
332334 if ( urlOptions . has ( key ) ) {
333335 const options = urlOptions . get ( key ) ?? [ ] ;
334336 values . push ( ...options ) ;
335337 }
336338 if ( DEFAULT_OPTIONS . has ( key ) ) {
337- const options = [ DEFAULT_OPTIONS . get ( key ) ] . flat ( ) ;
339+ const options = Array . isArray ( DEFAULT_OPTIONS . get ( key ) )
340+ ? DEFAULT_OPTIONS . get ( key )
341+ : [ DEFAULT_OPTIONS . get ( key ) ] ;
338342 values . push ( ...options ) ;
339343 }
340344 allOptions . set ( key , values ) ;
You can’t perform that action at this time.
0 commit comments