Skip to content

Commit

Permalink
fix(website): empty css cache response generates invalid font-face se…
Browse files Browse the repository at this point in the history
…lector (#934)
  • Loading branch information
ayuhito committed Feb 11, 2024
1 parent e63cb56 commit 60ee16b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion website/app/components/search/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const Filters = () => {
readOnly
style={{
pointerEvents: 'none',
display: 'flex',
}}
/>
</UnstyledButton>
Expand Down
4 changes: 2 additions & 2 deletions website/app/routes/fonts.$id._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => {
}

// Generate static CSS
let staticCSS = getCSSCache(`s:${id}`) as string;
let staticCSS = getCSSCache(`s:${id}`) ?? '';
if (!staticCSS) {
for (const weight of weights) {
for (const style of styles) {
Expand Down Expand Up @@ -101,7 +101,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => {
// Generate variable CSS
let variableCSS: string | undefined;
if (variable) {
variableCSS = getCSSCache(`v:${id}`);
variableCSS = getCSSCache(`v:${id}`) ?? '';
if (!variableCSS) {
for (const style of styles) {
variableCSS += unicodeKeys
Expand Down

0 comments on commit 60ee16b

Please sign in to comment.