0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Lazyloaded cheerio dependency

- we can move this lower in the code so it's not eagerly loaded when
  it's not needed
This commit is contained in:
Daniel Lockyer 2024-10-09 16:41:58 +01:00 committed by Daniel Lockyer
parent de5dcb8189
commit 67278d91a1

View file

@ -1,4 +1,3 @@
const cheerio = require('cheerio');
const logging = require('@tryghost/logging');
module.exports = class MentionDiscoveryService {
@ -62,6 +61,7 @@ module.exports = class MentionDiscoveryService {
return null;
}
const cheerio = require('cheerio');
const $ = cheerio.load(response.body);
// must be first <link> OR <a> element with rel=webmention