File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -189,17 +189,19 @@ function setupMcufamilies(downloads) {
189
189
} ) ;
190
190
191
191
mcufamilies . forEach ( function ( mcufamily ) {
192
- var li = document . createElement ( "li" ) ;
193
- var checkbox = document . createElement ( 'input' ) ;
194
- checkbox . type = "checkbox" ;
195
- checkbox . name = "mcufamily" ;
196
- checkbox . className = 'filter-checkbox' ;
197
- checkbox . value = mcufamily ;
198
-
199
- li . appendChild ( checkbox ) ;
200
- li . appendChild ( document . createTextNode ( mcufamily ) ) ;
201
-
202
- mcufamilyList . appendChild ( li ) ;
192
+ if ( mcufamily . length ) {
193
+ var li = document . createElement ( "li" ) ;
194
+ var checkbox = document . createElement ( 'input' ) ;
195
+ checkbox . type = "checkbox" ;
196
+ checkbox . name = "mcufamily" ;
197
+ checkbox . className = 'filter-checkbox' ;
198
+ checkbox . value = mcufamily ;
199
+
200
+ li . appendChild ( checkbox ) ;
201
+ li . appendChild ( document . createTextNode ( mcufamily ) ) ;
202
+
203
+ mcufamilyList . appendChild ( li ) ;
204
+ }
203
205
} ) ;
204
206
}
205
207
You can’t perform that action at this time.
0 commit comments