Skip to content

Commit 5502bce

Browse files
MAGETWO-72341: enable universal use of modal and tab_group #10789
2 parents 24144f3 + c3144d4 commit 5502bce

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/code/Magento/Ui/view/base/web/js/form/components/tab_group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ define([
6565
invalid;
6666

6767
invalid = _.find(result, function (item) {
68-
return !item.valid;
68+
return typeof item !== 'undefined' && !item.valid;
6969
});
7070

7171
if (invalid) {

app/code/Magento/Ui/view/base/web/js/modal/modal-component.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ define([
229229
* Validate everything validatable in modal
230230
*/
231231
validate: function (elem) {
232+
if (typeof elem === 'undefined') {
233+
return;
234+
}
235+
232236
if (typeof elem.validate === 'function') {
233237
this.valid = this.valid & elem.validate().valid;
234238
} else if (elem.elems) {

0 commit comments

Comments
 (0)