Conform more code to strict null checking (#10169)
* Conform more code to strict null checking * delint * Iterate * delint * Fix bad test
This commit is contained in:
parent
5123d7e641
commit
e8b92b308b
85 changed files with 283 additions and 287 deletions
|
@ -135,7 +135,7 @@ export class CapabilityText {
|
|||
// First see if we have a super simple line of text to provide back
|
||||
if (CapabilityText.simpleCaps[capability]) {
|
||||
const textForKind = CapabilityText.simpleCaps[capability];
|
||||
if (textForKind[kind]) return { primary: _t(textForKind[kind]) };
|
||||
if (textForKind[kind]) return { primary: _t(textForKind[kind]!) };
|
||||
if (textForKind[GENERIC_WIDGET_KIND]) return { primary: _t(textForKind[GENERIC_WIDGET_KIND]) };
|
||||
|
||||
// ... we'll fall through to the generic capability processing at the end of this
|
||||
|
@ -195,8 +195,8 @@ export class CapabilityText {
|
|||
: CapabilityText.nonStateSendRecvCaps;
|
||||
if (evSendRecv[eventCap.eventType]) {
|
||||
const textForKind = evSendRecv[eventCap.eventType];
|
||||
const textForDirection = textForKind[kind] || textForKind[GENERIC_WIDGET_KIND];
|
||||
if (textForDirection && textForDirection[eventCap.direction]) {
|
||||
const textForDirection = textForKind?.[kind] || textForKind?.[GENERIC_WIDGET_KIND];
|
||||
if (textForDirection?.[eventCap.direction]) {
|
||||
return {
|
||||
primary: _t(textForDirection[eventCap.direction]),
|
||||
// no byline because we would have already represented the event properly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue