fixes #7155 - insure displayMessage is present

fixed rubocop