File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -168,16 +168,18 @@ function hasTag(head: HeadConfig[], tag: HeadConfig) {
168
168
)
169
169
}
170
170
171
- // Merge head tags, overwrite duplicate meta tags in ascending precedence
172
- export function mergeHead ( ...heads : HeadConfig [ ] [ ] ) {
173
- return heads
171
+ export function mergeHead ( incoming : HeadConfig [ ] , ...current : HeadConfig [ ] [ ] ) {
172
+ return current
174
173
. filter ( Array . isArray )
175
174
. flat ( 1 )
176
175
. reverse ( )
177
- . reduce ( ( merged , tag ) => {
178
- if ( ! hasTag ( merged , tag ) ) merged . push ( tag )
179
- return merged
180
- } , [ ] ) as HeadConfig [ ]
176
+ . reduce (
177
+ ( merged , tag ) => {
178
+ if ( ! hasTag ( merged , tag ) ) merged . push ( tag )
179
+ return merged
180
+ } ,
181
+ [ ...incoming ]
182
+ )
181
183
}
182
184
183
185
// https://github.com/rollup/rollup/blob/fec513270c6ac350072425cc045db367656c623b/src/utils/sanitizeFileName.ts
You can’t perform that action at this time.
0 commit comments