That depends. California is a no-fault state. This means that a person’s morality cannot be considered in determining the outcome of a case. If your spouse had an affair during the marriage, this is not a basis to deny your spouse visitation, nor is it, in and of itself, a reason to obtain custody of the children. However, if the affair interferes with your spouse’s ability to care for your children, then it is a different matter. For instance, if your spouse is not home, comes home late at night, or is otherwise neglecting the children as a result of his/her extramarital affair, the court could find that you are best able to care for the children and award you custody.