From a10187763b212688310666b92cfa3d784361e014 Mon Sep 17 00:00:00 2001 From: Benyamin Galeano Date: Tue, 30 Aug 2022 21:09:11 -0600 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20get=20types=20from=20typ?= =?UTF-8?q?e=20object,=20if=20the=20list=20is=20falsy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/questions/type.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/questions/type.js b/lib/questions/type.js index 2f8daab0..50ddfce1 100644 --- a/lib/questions/type.js +++ b/lib/questions/type.js @@ -17,7 +17,7 @@ const typeToListItem = ({types, disableEmoji}, type) => { * @param {string[]} config The whole config. */ const findType = function (substring, config) { - const types = config.list; + const types = config.list || Object.keys(config.types); return Promise.resolve(fuzzy.filter(substring || '', types).map(({original: type}) => typeToListItem(config, type))); };