Browse Source

Fallback to default error if none is specified

Rafał Pitoń 11 years ago
parent
commit
753f0ea3f8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      misago/static/misago/js/misago-alerts.js

+ 4 - 0
misago/static/misago/js/misago-alerts.js

@@ -42,6 +42,10 @@
 
     // Alerts functions
     this.add_alert = function(template, message) {
+      if (message == undefined) {
+        message = this.options.generic_error;
+      }
+
       var $alert = $(template.replace('%message%', message));
       this.$alerts_list.append($alert);