refactor(open_graph): arrow function

This commit is contained in:
curben 2019-08-11 11:44:42 +09:30
parent 711244cfdf
commit 9f5e8de651
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 2 additions and 2 deletions

View File

@ -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)
})
}