Browse Source

长度相等不重设数组长度

visuddhinanda 3 năm trước cách đây
mục cha
commit
b22f1e1096
1 tập tin đã thay đổi với 3 bổ sung và 0 xóa
  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]);