🐛 fix(ApiModal/index.tsx): add missing condition to check if getTweak array is empty before pushing a new tweak to the tweak ref

 feat(ApiModal/index.tsx): automatically build and push a new tweak to the tweak ref if getTweak array is empty
This commit is contained in:
Cristhian Zanforlin Lousa 2023-07-14 11:46:48 -03:00
commit 032e48ac7f

View file

@ -109,6 +109,12 @@ const ApiModal = forwardRef(
useEffect(() => {
filterNodes();
if(getTweak.length == 0){
const t = buildTweaks(flow);
tweak?.current?.push(t);
}
}, []);
if (Object.keys(tweaksCode).length > 0) {