Skip to content

Commit 209fe56

Browse files
committed
Amendments regarding PR
1 parent a260def commit 209fe56

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ class GoogleFontLoader extends React.PureComponent {
99

1010
const families = fonts.reduce((acc, font) => {
1111
const family = font.font.replace(/ +/g, '+');
12+
const weights = (font.weights || []).join(',');
1213

13-
const weights = font.weights instanceof Array && font.weights.length > 0 ? font.weights.join(',') : '';
14-
15-
acc.push(`${family}${weights && `:${weights}`}`);
14+
acc.push(family + (weights && `:${weights}`));
1615

1716
return acc;
1817
}, []).join('|');

0 commit comments

Comments
 (0)