You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return pickListValues.filter((each) => "fullName" in each).map((current) => current.fullName);
^
TypeError: pickListValues.filter is not a function
at toPickListValues (...\node-versions\v22.3.0\installation\node_modules\@cparra\apexdocs\dist\logger-DC5HNMQO.js:1946:31)
...
The point where it fails is for CustomObject (name and label replaced) where there is only 1 value inside valueSetDefinition:
This dummy fix helps: (not the best solution though as there is probably more occurencies where xml nodes can be 0,1 or many and are returned as either array or single node)
Thanks @aranwe , I was able to reproduce. The issue is due to the way that the fast-xml-parser parses that data when there is a single node vs. many. Your solution should work, since there is already a validation in there making sure that the value key exists (if there are 0 nodes it won't be there).
Let me me put that in place and release a new version
Hi,
When generating apexdocs markdown it fails in:
apexdocs/src/core/reflection/sobject/parse-picklist-values.ts
Line 26 in 39c2a30
with error:
The point where it fails is for CustomObject (name and label replaced) where there is only 1 value inside valueSetDefinition:
This dummy fix helps: (not the best solution though as there is probably more occurencies where xml nodes can be 0,1 or many and are returned as either array or single node)
ApexDocs version: 3.7.0
Node version: 22.3.0
Platform: win-x64
The text was updated successfully, but these errors were encountered: