if (children.length > 0) {
      let shouldDismiss = true;

      children.forEach((child) => {
        if (