From 8d01c8bb0c88c23fb12d48d914abb7b2fe05935f Mon Sep 17 00:00:00 2001 From: Steven Hicks Date: Tue, 17 Dec 2024 15:36:54 -0600 Subject: [PATCH] fix: real, actual javascript in api generators --- 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(); }