N°4051 Add robustness

This commit is contained in:
Stephen Abello
2021-06-10 15:03:31 +02:00
parent 4d5ff22b60
commit 679542eaaa

View File

@@ -197,7 +197,7 @@ function activateFirstTabWithError(sFormId) {
$tabs.each(function (index, element) {
var $fieldsWithError = $(element).find(".form_validation");
if ($fieldsWithError.length > 0)
if ($fieldsWithError.length > 0 && ($tabsContainer.tabs("instance") !== undefined))
{
$tabsContainer.tabs("option", "active", index);
return false;