File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import { transformWithEsbuild } from 'vite'
22import { grants } from './constants.js'
33import type { Grants , Transform } from './types.js'
44
5- export function removeDuplicates (
6- arr : string | string [ ] | readonly string [ ] | undefined
7- ) : any [ ] {
5+ export function removeDuplicates ( arr : any ) : any [ ] {
86 return [ ...new Set ( Array . isArray ( arr ) ? arr : arr ? [ arr ] : [ ] ) ]
97}
108
Original file line number Diff line number Diff line change @@ -64,9 +64,7 @@ export default function UserscriptPlugin(
6464 'connect'
6565 ] ) . forEach ( ( key ) => {
6666 const value = config . header [ key ]
67- if ( Array . isArray ( value ) ) {
68- config . header [ key ] = removeDuplicates ( value )
69- }
67+ config . header [ key ] = removeDuplicates ( value )
7068 } )
7169
7270 config . server = {
You can’t perform that action at this time.
0 commit comments