I fixed this by simply adding var alert; However, is this what I should be doing to get the pesky error message to go away? Here is the fix. Here is the fail
var alert;
Instead of:
alert('message')
I use:
var alert = window['alert'];