From f2efb13a65f51fbf083b7353e58b941041de86b8 Mon Sep 17 00:00:00 2001 From: Steven Hicks Date: Wed, 18 Dec 2024 09:01:45 -0600 Subject: [PATCH] fix: real, actual javascript in api generators (#4788) --- api/generate-api-docs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/generate-api-docs.js b/api/generate-api-docs.js index 6c6f2de56a4..0268d6b6fac 100644 --- a/api/generate-api-docs.js +++ b/api/generate-api-docs.js @@ -21,7 +21,7 @@ function runCommand(command) { // API name must be passed in as an arg. const api = process.argv[2]; if (api === undefined) { - const validAPIs = string.join(apiStrategies.join, ", "); + const validAPIs = Object.keys(apiStrategies).join(", "); console.log(`Please specify an API name. Valid names: ${validAPIs}`); process.exit(); } @@ -29,7 +29,7 @@ if (api === undefined) { // The API name must be recognized. const strategy = apiStrategies[api]; if (strategy === undefined) { - const validAPIs = string.join(apiStrategies.join, ", "); + const validAPIs = Object.keys(apiStrategies).join(", "); console.error(`Invalid API name ${api}. Valid names: ${validAPIs}`); process.exit(); }