Skip to content

Commit

Permalink
fix: only prepend once 馃ぃ and update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 26, 2024
1 parent 836a605 commit 8a000ae
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions src/plugins/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ export const FontFamilyInjectionPlugin = (options: FontFamilyInjectionPluginOpti
}
}

s.prepend(prefaces.join(''))

// Add font family names for generated fallbacks
if (fallbackDeclarations.length) { insertFontFamilies = true }
}

s.prepend(prefaces.join(''))

if (fallbackOptions && insertFontFamilies) {
const insertedFamilies = fallbackMap.map(f => `"${f.name}"`).join(', ')
s.prependLeft(fallbackOptions.index, `, ${insertedFamilies}`)
Expand Down

0 comments on commit 8a000ae

Please sign in to comment.