Skip to content

Commit

Permalink
refactor(css build plugin): remove use of spread operator
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy committed May 3, 2023
1 parent 1411687 commit a73490c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/astro/src/core/build/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ export function mergeInlineCss(
const currentIsInline = current?.type === 'inline';
if (lastWasInline && currentIsInline) {
const merged = { type: 'inline' as const, content: lastAdded.content + current.content };
return [...acc.slice(0, acc.length - 1), merged];
acc[acc.length - 1] = merged;
return acc;
}
return [...acc, current];
acc.push(current)
return acc;
}

export function isHoistedScript(internals: BuildInternals, id: string): boolean {
Expand Down

0 comments on commit a73490c

Please sign in to comment.