TS2532: Object is possibly 'undefined' - Even when there is a check

后端 未结 0 2002
感情败类
感情败类 2021-01-29 18:31

I am doing the following object access. But TS complains that it may be undefined even when I check for it.

      if (metrics[key0]) {
        if (metrics[key0][k         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题