Small improvements
This commit is contained in:
@@ -78,6 +78,10 @@ export function extractResponsiveImage(
|
||||
return { url, width };
|
||||
});
|
||||
|
||||
if (sources.length === 0) {
|
||||
return img.attr('src') || '';
|
||||
}
|
||||
|
||||
const largest = sources.reduce((prev: any, current: any) =>
|
||||
prev.width > current.width ? prev : current
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user