Skip to content

Commit

Permalink
Fix issue with light theme
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Nov 18, 2023
1 parent ba63fb2 commit ce4491e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/generate-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ export const generatePreview = async (fileNames: string[], config: Config) => {
);
const lightTheme = createTheme(
'light',
fileNames.filter((f) =>
fileNames.includes(`${basename(f, '.svg')}_light.svg`) ? false : true
fileNames.filter(
(f) =>
!fileNames.some((otherFile) =>
otherFile.includes(`${basename(f, '.svg')}_light.svg`)
)
)
);
const previewTemplate = `<!DOCTYPE html><head><style>${previewStyles}</style></head>
Expand Down

0 comments on commit ce4491e

Please sign in to comment.