File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ var GoogleFontLoader = function (_React$PureComponent) {
42
42
43
43
var families = fonts . reduce ( function ( acc , font ) {
44
44
var family = font . font . replace ( / + / g, '+' ) ;
45
- var weights = font . weights . join ( ',' ) ;
45
+ var weights = ( font . weights || [ ] ) . join ( ',' ) ;
46
46
47
- acc . push ( family + ':' + weights ) ;
47
+ acc . push ( family + ( weights && ':' + weights ) ) ;
48
48
49
49
return acc ;
50
50
} , [ ] ) . join ( '|' ) ;
@@ -90,11 +90,9 @@ var GoogleFontLoader = function (_React$PureComponent) {
90
90
return GoogleFontLoader ;
91
91
} ( _react2 . default . PureComponent ) ;
92
92
93
- ;
94
-
95
93
GoogleFontLoader . propTypes = {
96
94
fonts : _propTypes2 . default . arrayOf ( _propTypes2 . default . shape ( {
97
- font : _propTypes2 . default . string ,
95
+ font : _propTypes2 . default . string . isRequired ,
98
96
weights : _propTypes2 . default . arrayOf ( _propTypes2 . default . number )
99
97
} ) ) . isRequired
100
98
} ;
You can’t perform that action at this time.
0 commit comments