estum / growlyflash

Growl-styled flash messages for Ruby on Rails and Bootstrap
MIT License
58 stars 34 forks source link

title: true override setting results in error: TypeError: s.replace is not a function #33

Closed ghost closed 8 years ago

ghost commented 8 years ago

Without any other configuration, changing the hash option title: true in javascript results in an error message in the console pointing to s.replace in line 36.

    Growlyflash.DISMISS = "<button type=\"close\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>";

    _titleize = function(s) {
      return s.replace(/^./, function(m) {
        return m.toUpperCase();
      });
    };