play-resources: fix container insertion in case of no alternatives
This commit is contained in:
parent
802553cc00
commit
2a104307f8
|
@ -107,11 +107,11 @@ $(document).ready(function() {
|
|||
res.preview = preview;
|
||||
|
||||
/* Check playability */
|
||||
if (res.map(function(res) {
|
||||
return res.type;
|
||||
if (res.map(function(r) {
|
||||
return r.type;
|
||||
}).some(canPlay)) {
|
||||
var liEl = $('<li></li>');
|
||||
alternativeEls.last().after(liEl);
|
||||
((alternativeEls.length < 1) ? $(this) : alternativeEls.last()).after(liEl);
|
||||
var player = addButton(liEl, res);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue