For the eyes of the Lord run to and fro throughout the whole earth, to shew himself strong in the behalf of them whose heart is perfect toward him… (2 Chronicles 16:9 KJV)
God looks at our heart. It is the condition of our heart that God is worried about. We should always be asking God if there is anything that is displeasing to Him. God wants to work on our behalf but we have to maintain a right heart before Him.
A person with a right heart should always be checking their attitude in every situation making sure they will react in the right way. The only way to have a heart that is “perfect towards Him” is through Jesus Christ and allowing the Holy Spirit to do the work in our heart that needs to be done.