Explorar o código

Return if there are no divs in container

sbkwgh %!s(int64=8) %!d(string=hai) anos
pai
achega
ac89a50223
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/assets/js/flexBoxGridCorrect.js

+ 2 - 0
src/assets/js/flexBoxGridCorrect.js

@@ -39,6 +39,8 @@ function addFlexBoxChildren(parentString, childClass) {
 		container.appendChild(div);
 	}
 
+	//If there are no divs
+	if(!getChildren().length) return;
 
 	//Since there is only one div on the last line therefore
 	//Add another one to allow for the next comparison