Skip to content

Commit

Permalink
fix: id for svgs
Browse files Browse the repository at this point in the history
  • Loading branch information
stramel committed Nov 7, 2024
1 parent 9344a25 commit 28d6c38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/astro/src/assets/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export interface SvgComponentProps {
/**
* Make sure these IDs are kept on the module-level so they're incremented on a per-page basis
*/
// let ids = 0;

const ids = new WeakMap<SSRResult, number>();
let counter = 0;

Expand All @@ -32,6 +30,8 @@ export function createSvgComponent({ meta, attributes, children }: SvgComponentP
ids.set(result, counter);
id = counter;
}
id = `a:${id}`;

const {
title: titleProp,
viewBox,
Expand Down

0 comments on commit 28d6c38

Please sign in to comment.