Browse Source

长度相等不重设数组长度

visuddhinanda 3 years ago
parent
commit
b22f1e1096
1 changed files with 3 additions and 0 deletions
  1. 3 0
      dashboard/src/components/template/Wbw/WbwDetailFm.tsx

+ 3 - 0
dashboard/src/components/template/Wbw/WbwDetailFm.tsx

@@ -117,6 +117,9 @@ const WbwDetailFmWidget = ({
 
   useEffect(() => {
     console.log("factors", factors);
+    if (factors.length === factorMeaning.length) {
+      return;
+    }
     setFactorMeaning(resizeArray(factorMeaning));
   }, [factors]);