Fix for validator results tomfoolery
The `description` field of a validation message is now `null` if there is no description for the message (for consistency). No need for such strict type restrictions; a falsey value is an empty description always.
This commit is contained in:
Родитель
238be139bc
Коммит
9a5a2eb284
|
@ -197,7 +197,7 @@ function initValidator($doc) {
|
|||
msgDiv.attr('id', 'v-msg-' + msg.uid);
|
||||
msgDiv.addClass('msg-' + effectiveType);
|
||||
$('h5', msgDiv).html(msg.message);
|
||||
if (typeof(msg.description) === 'undefined' || msg.description === '') {
|
||||
if (!msg.description) {
|
||||
msg.description = [];
|
||||
} else if (typeof(msg.description) === 'string') {
|
||||
// Currently it can be either of these:
|
||||
|
|
Загрузка…
Ссылка в новой задаче