Merge pull request #5810 from aignatov-bio/ai-sci-8890-fix-js-error-in-console-log

Fix js error in console log [SCI-8890]
This commit is contained in:
aignatov-bio 2023-07-19 09:57:46 +02:00 committed by GitHub
commit 03225bbd7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -499,7 +499,9 @@ var ExperimnetTable = {
});
},
updateExperimentToolbar: function() {
window.actionToolbarComponent.fetchActions({ my_module_ids: this.selectedMyModules });
if (window.actionToolbarComponent) {
window.actionToolbarComponent.fetchActions({ my_module_ids: this.selectedMyModules });
}
},
selectDate: function($field) {
var datePicker = $field.data('DateTimePicker');

View file

@ -144,8 +144,10 @@
}
function updateButtons() {
window.actionToolbarComponent.fetchActions({ label_template_ids: rowsSelectedIDs() });
$('.dataTables_scrollBody').css('padding-bottom', `${rowsSelectedIDs().length > 0 ? 68 : 0}px`);
if (window.actionToolbarComponent) {
window.actionToolbarComponent.fetchActions({ label_template_ids: rowsSelectedIDs() });
$('.dataTables_scrollBody').css('padding-bottom', `${rowsSelectedIDs().length > 0 ? 68 : 0}px`);
}
}
function reloadTable() {

View file

@ -114,7 +114,7 @@ export default {
}
},
children: function() {
if (this.children.length > 0) {
if (this.children && this.children.length > 0) {
this.childrenExpanded = true;
} else if (this.childrenLoaded) {
this.item.has_children = false;