diff --git a/generators/gfycat.js b/generators/gfycat.js index 7df8625..d835fe0 100644 --- a/generators/gfycat.js +++ b/generators/gfycat.js @@ -1,7 +1,10 @@ const fs = require('fs-extra'); const adjectives = fs.readFileSync('./generators/gfycat/adjectives.txt').toString().split('\n'); const animals = fs.readFileSync('./generators/gfycat/animals.txt').toString().split('\n'); -const MIN_LENGTH = require('../setup').gfyIdSize; + +// Don't trigger circular dependency during setup +if (!require.main.filename.includes('setup.js')) + var MIN_LENGTH = require('../setup').gfyIdSize; function getWord(list, delim = '') { return list[Math.floor(Math.random() * list.length)].concat(delim);