From 9f5e8de651b181d523ec5019ff04781eee8dbf80 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Sun, 11 Aug 2019 11:44:42 +0930 Subject: [PATCH] refactor(open_graph): arrow function --- themes/typing/scripts/openGraph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/typing/scripts/openGraph.js b/themes/typing/scripts/openGraph.js index bf24c4c..7e96475 100644 --- a/themes/typing/scripts/openGraph.js +++ b/themes/typing/scripts/openGraph.js @@ -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) }) }