fix(chat): guard against undefined customModes.custom Fix #272223 and #272236#272263
fix(chat): guard against undefined customModes.custom Fix #272223 and #272236#272263lramos15 merged 1 commit intomicrosoft:mainfrom
Conversation
|
Thanks for the contribution |
|
@lramos15 do we have a type problem though, why was this not discovered previously? |
|
I'll defer to @roblourens since this is his code (I just merged this to unblock the broken picker), but looks like this regressed with #272197. Funny enough Copilot code review caught this #272197 (comment) |
|
Thanks @tamuratak! This is apparently an issue with the type definition of |
The thing is that the first part of the comment |
See #272263, it currently assumes that all keys of K will be defined. This still isn't perfect, because it says that the returned object might contain a key with value `undefined`, but in reality, if a key is defined, it will have a value. So now usages of this with Object.entries and so on are slighly wrong, but that's preferable IMO.
See #272263, it currently assumes that all keys of K will be defined. This still isn't perfect, because it says that the returned object might contain a key with value `undefined`, but in reality, if a key is defined, it will have a value. So now usages of this with Object.entries and so on are slighly wrong, but that's preferable IMO.
Guard against undefined customModes.custom. Fix #272223 and #272236