mirror of https://gitlab.com/curben/blog
refactor(open_graph): arrow function
This commit is contained in:
parent
711244cfdf
commit
9f5e8de651
|
@ -72,8 +72,8 @@ function openGraphHelper (options = {}) {
|
|||
if (!cheerio) cheerio = require('cheerio');
|
||||
const $ = cheerio.load(content)
|
||||
|
||||
$('img').each(function () {
|
||||
const src = $(this).attr('data-src')
|
||||
$('img').each((index, element) => {
|
||||
const src = $(element).attr('data-src')
|
||||
if (src) images.push(src)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue