Skip to content

Commit

Permalink
Fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Jul 27, 2023
1 parent c0a29f4 commit 20b898a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/astro/src/runtime/server/render/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export function renderUniqueScriptElement(result: SSRResult, { props, children }

export function renderUniqueStylesheet(result: SSRResult, sheet: StylesheetAsset) {
if (sheet.type === 'external') {
if (Array.from(result.links).some((s) => s.props.href === sheet.src)) return '';
const key = 'script-external-' + sheet.src;
if (Array.from(result.styles).some((s) => s.props.href === sheet.src)) return '';
const key = 'link-external-' + sheet.src;
if(checkOrAddContentKey(result, key)) return '';
return renderElement('link', {
props: {
Expand All @@ -38,7 +38,7 @@ export function renderUniqueStylesheet(result: SSRResult, sheet: StylesheetAsset

if (sheet.type === 'inline') {
if (Array.from(result.styles).some((s) => s.children.includes(sheet.content))) return '';
const key = `script-inline-` + sheet.content;
const key = `link-inline-` + sheet.content;
if(checkOrAddContentKey(result, key)) return '';
return renderElement('style', { props: { type: 'text/css' }, children: sheet.content });
}
Expand Down

0 comments on commit 20b898a

Please sign in to comment.