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
Here, it expects that the value is always string and tries to call toLowerCase() without checking its type.
If we add typeof choiceValue === 'string' it should be possible to match choice values by name and/or index.
As a temporary solution I added toLowerCase: () => name to the value (which is an ugly solution).
The text was updated successfully, but these errors were encountered:
I have a
list
prompt, and each item in the list has an object set for its value, e.g.:When I try to bypass that prompt with any of these, it fails.
After debugging, I found out that the reason is because of this line:
https://github.com/plopjs/node-plop/blob/1c09ef314eed9f16a8071a2870c6df472201be02/src/prompt-bypass.js#L27
Here, it expects that the
value
is always string and tries to calltoLowerCase()
without checking its type.If we add
typeof choiceValue === 'string'
it should be possible to match choice values by name and/or index.As a temporary solution I added
toLowerCase: () => name
to the value (which is an ugly solution).The text was updated successfully, but these errors were encountered: