Sfoglia il codice sorgente

长度相等不重设数组长度

visuddhinanda 3 anni fa
parent
commit
b22f1e1096
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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]);