mirror of
https://github.com/HandBrake/HandBrake-docs.git
synced 2025-12-10 00:44:52 -06:00
template: Avoid JavaScript error for documents with no srcset attribute.
This commit is contained in:
parent
4dacd67676
commit
27da5acfc3
@ -189,7 +189,7 @@ $(document).ready(function(){
|
||||
$.featherlight.defaults.contentFilters.unshift('image2');
|
||||
docs.find('figure > a:has(img)').each(function(){
|
||||
var srcset = $(this).children('img').first().attr('srcset');
|
||||
if (srcset.length > 0){
|
||||
if (typeof srcset !== 'undefined'){
|
||||
$(this).attr('data-srcset', srcset);
|
||||
}
|
||||
$(this).featherlight({type: 'image2', openSpeed: 150, closeSpeed: 150});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user