Even though Jehoram was wicked, God did not destroy Judah. He honored his promise to David (2 Samuel 7:11–16).
The Lord promised to keep David’s descendants on Judah's throne as a symbol of God's grace (1 Kings 11:36). God's promises to David are ultimately fulfilled in Jesus (Ezekiel 34:23–31), who is the light of the world (John 4:1–5).