Skip to content

Commit

Permalink
Fix broken settings icons
Browse files Browse the repository at this point in the history
Resolves #2408
  • Loading branch information
Gerrit0 committed Oct 6, 2023
1 parent f2d2abe commit 878e06a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Unreleased

### Features

- Improved support for multi-word searches, #2400.

### Bug Fixes

- Fixed broken settings icons caused by icon caching introduced in 0.25.1, #2408.

### Thanks!

- @schiem

## v0.25.1 (2023-09-04)

### Features
Expand Down
6 changes: 6 additions & 0 deletions src/lib/output/themes/default/partials/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export function buildRefIcons<T extends Record<string, () => JSX.Element>>(icons
for (const [name, builder] of Object.entries(icons)) {
const jsx = builder.call(icons);
assert(jsx.tag === "svg", "TypeDoc's frontend assumes that icons are written as svg elements");
// This one cannot be cached because the CSS selector depends on targeting SVG elements
// within it. Ick. Surely there's a nicer way?
if (name === "checkbox") {
refs[name] = () => jsx;
continue;
}

children.push(<g id={`icon-${name}`}>{jsx.children}</g>);
const ref = (
Expand Down

0 comments on commit 878e06a

Please sign in to comment.