In every proceeding where there is at issue a dispute as to the custody of a child, a determination by the court that domestic or family violence has occurred raises a rebuttable presumption by the court that it is detrimental to the child and not in the best interest of the child to be placed in sole custody, joint legal custody, or joint physical custody with the perpetrator of domestic or family violence. Notwithstanding the provisions regarding rebuttable presumption, the judge must also take into account what, if any, impact the domestic violence had on the child.