We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that variables in repoData are sometimes undefined
CircleCI-Env-Inspector/index.js
Lines 136 to 149 in f234e25
file:///project/index.js:150 USER_DATA.projects = repoData.filter((repo) => repo.variables.length > 0); ^ TypeError: Cannot read properties of undefined (reading 'length') at file:///project/index.js:150:63 at Array.filter (<anonymous>) at file:///project/index.js:150:31 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v19.3.0
The text was updated successfully, but these errors were encountered:
I patched it and got around it.
diff --git a/index.js b/index.js index 7bc2df2..5b3ce33 100644 --- a/index.js +++ b/index.js @@ -146,6 +146,6 @@ const repoData = await Promise.all( }; }) ); -USER_DATA.projects = repoData.filter((repo) => repo.variables.length > 0); +USER_DATA.projects = repoData.filter((repo) => (repo.variables || []).length > 0); console.dir(USER_DATA, { depth: null });
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What
It seems that variables in repoData are sometimes undefined
CircleCI-Env-Inspector/index.js
Lines 136 to 149 in f234e25
Log
The text was updated successfully, but these errors were encountered: