A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
TypeScript agent-skillsaidsh-pluginhacktoberfestjavascriptmcp-serverreactresume-builderself-hostedtypescript
fix(pdf): avoid toReversed in icon size resolution (#3129)
Lihan YANGe00ff8ceca3e
diff --git a/packages/pdf/src/templates/shared/icon-size.ts b/packages/pdf/src/templates/shared/icon-size.tsindex 8929934ff..16ab5a2cf 100644--- a/packages/pdf/src/templates/shared/icon-size.ts+++ b/packages/pdf/src/templates/shared/icon-size.ts@@ -17,7 +17,12 @@ export const parseStyleFontSize = (fontSize: Style["fontSize"] | undefined): numexport const resolveStyleFontSize = (...styles: StyleInput[]): number | undefined => {for (let index = styles.length - 1; index >= 0; index -= 1) {- for (const style of composeStyles(styles[index]).toReversed()) {+ const composedStyles = composeStyles(styles[index]);++ for (let styleIndex = composedStyles.length - 1; styleIndex >= 0; styleIndex -= 1) {+ const style = composedStyles[styleIndex];+ if (style === undefined) continue;+const fontSize = parseStyleFontSize(style.fontSize);if (fontSize !== undefined) return fontSize;}