We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a260def commit 209fe56Copy full SHA for 209fe56
src/index.js
@@ -9,10 +9,9 @@ class GoogleFontLoader extends React.PureComponent {
9
10
const families = fonts.reduce((acc, font) => {
11
const family = font.font.replace(/ +/g, '+');
12
+ const weights = (font.weights || []).join(',');
13
- const weights = font.weights instanceof Array && font.weights.length > 0 ? font.weights.join(',') : '';
14
-
15
- acc.push(`${family}${weights && `:${weights}`}`);
+ acc.push(family + (weights && `:${weights}`));
16
17
return acc;
18
}, []).join('|');
0 commit comments