Error TS2532 - Object is possibly 'undefined' where it cannot be undefined

前端 未结 0 1791
猫巷女王i
猫巷女王i 2021-01-31 05:04

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         


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