diff --git a/inc/teddit_api/handleSubreddit.js b/inc/teddit_api/handleSubreddit.js index fd2d334..98fd0ac 100644 --- a/inc/teddit_api/handleSubreddit.js +++ b/inc/teddit_api/handleSubreddit.js @@ -181,12 +181,12 @@ module.exports = function () { link.images.thumb = `${protocol}://${config.domain}${link.images.thumb}`; } } + + if (mode === 'light') { + link.selftext_html = null; + } } - if (mode === 'light') { - processed_json.selftext_html = null; - } - return res.end(JSON.stringify(processed_json)); } }