Merge pull request #5853 from aignatov-bio/ai-sci-8890-fix-navigator-error-in-console

Fix navigator console errors [SCI-8890]
This commit is contained in:
aignatov-bio 2023-07-25 11:16:54 +02:00 committed by GitHub
commit e51054af48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,9 +63,14 @@ export default {
},
computed: {
hasChildren: function() {
return !this.item.disabled && (this.item.has_children || this.children.length > 0);
if (this.item.disabled) return false;
if (this.item.has_children) return true;
if (this.children && this.children.length > 0) return true;
return false
},
sortedMenuItems: function() {
if (!this.children) return [];
return this.children.sort((a, b) => {
if (a.name.toLowerCase() < b.name.toLowerCase()) {
return -1;