Skip to content

Commit

Permalink
[bugfix] fix dual alert messages where the second one is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jul 20, 2016
1 parent 83d5ad2 commit 7bba9f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion caravel/assets/javascripts/modules/caravel.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,10 @@ var px = (function () {
token.find("img.loading").hide();
var err = msg ? ('<div class="alert alert-danger">' + msg + '</div>') : "";
if (xhr) {
err += '<div class="alert alert-danger">' + this.getErrorMsg(xhr) + '</div>';
var extendedMsg = this.getErrorMsg(xhr);
if (extendedMsg) {
err += '<div class="alert alert-danger">' + extendedMsg + '</div>';
}
}
container.html(err);
container.show();
Expand Down

0 comments on commit 7bba9f7

Please sign in to comment.