Skip to content

Commit

Permalink
When getting input label on error for alert message, get only first l…
Browse files Browse the repository at this point in the history
…abel, in case there are multiple labels or inputs in the view.
  • Loading branch information
storian committed Dec 5, 2018
1 parent e81130f commit b6fdfb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/wing.js
Expand Up @@ -57,7 +57,7 @@ wing.angular_http_interceptor = function ($q) {
else {
var matches = message.split(/ /);
var field = matches[0].toLowerCase();
var label = $('label[for="'+field+'"]').text();
var label = $('label[for="'+field+'"]').first().text();
if (label) {
message = message.replace(field,label);
}
Expand Down

0 comments on commit b6fdfb5

Please sign in to comment.