diff --git a/js/app.js b/js/app.js
index b9a4ff67..408bdb07 100644
--- a/js/app.js
+++ b/js/app.js
@@ -47,14 +47,12 @@ app = Sammy('#main', function (sam) {
html = '';
for(lvl in flashs) {
flashs[lvl].forEach( function(msg) {
- html += '
'+ msg +'
';
+ if (lvl == 'fail') { alertClass = 'alert-danger'; }
+ else { alertClass = 'alert-'+ lvl; }
+ html += '
'+ msg +'
';
});
}
- if (level == 'fail') { alertClass = 'alert-danger'; }
- else if (level == 'success') { alertClass = 'alert-success'; }
- else { alertClass = 'alert-info'; }
-
- $('#flash').removeClass().addClass('alert '+ alertClass).html(html).fadeIn();
+ $('#flash').html(html).fadeIn();
},
// API connection helper