Permalink
Browse files

When getting input label on error for alert message, get only first l…

…abel, in case there are multiple labels or inputs in the view.
  • Loading branch information...
storian committed Dec 5, 2018
1 parent e81130f commit b6fdfb552141b0c3266dea69a53efee8bfeff8c1
Showing with 1 addition and 1 deletion.
  1. +1 −1 public/wing.js
@@ -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);
}

0 comments on commit b6fdfb5

Please sign in to comment.