mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
🐛 Fixed bookmark card creation and pasted link unfurls (#17990)
no issue - recently added code to grab apple touch icons or SVGs before falling back to the default metascraper behaviour wrongly assumed that every size would have a `rel` and `href` attribute which is not the case
This commit is contained in:
parent
95c63e16c9
commit
309184f5da
1 changed files with 2 additions and 2 deletions
|
@ -208,8 +208,8 @@ class OEmbedService {
|
|||
|
||||
const pickFn = (sizes, pickDefault) => {
|
||||
// Prioritize apple touch icon with sizes > 180
|
||||
const appleTouchIcon = sizes.find(item => item.rel.includes('apple') && item.sizes && item.size.width >= 180);
|
||||
const svgIcon = sizes.find(item => item.href.endsWith('svg'));
|
||||
const appleTouchIcon = sizes.find(item => item.rel?.includes('apple') && item.sizes && item.size.width >= 180);
|
||||
const svgIcon = sizes.find(item => item.href?.endsWith('svg'));
|
||||
return appleTouchIcon || svgIcon || pickDefault(sizes);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue