Conversation
|
It shouldn't be possible for _values[name] to be undefined for flags at this point... do you have a repro example you can share? |
|
You can open this link to see the I'm using the |
|
Ah, looks like I messed up in |
|
I don't think I want to add the logging to all of the readers, the errors thrown from the Options class (especially those that can be caused by bad configuration) should already have the option name in them, will review those to make sure they look right. |
|
thanks for your fix! |
|
Thank you! Your repro made it quickly obvious what the problem was once I looked at it :) |
When setting an option with the type of
ParameterType.Flags, ifthis._values[declaration.name]doesn't exist yet, TypeDoc will throw[error] Cannot convert undefined or null to object. This PR fixes it by assigning an empty object when it is undefined.This PR also improves the logging by adding some extra information about the current key when
setValuemethod throws an error.