how to fix sonarqube rule:“data” hides or potentially hides a variable declared in an outer scope at line

后端 未结 0 1083
心在旅途
心在旅途 2021-02-12 08:49

the code was like

 getDatas
      .then((data) => {
        if (data.msg !== \'ok\') {
          setError(data.msg);
        }
        setData(data.data);
             


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