Fixed #3513 - Menu: TypeError with only disabled menuitems

pull/3539/head
Tuğçe Küçükoğlu 2023-01-16 13:07:17 +03:00
parent 201a6ac138
commit ea4a2782e1
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ export default {
const links = DomHandler.find(this.container, 'li.p-menuitem:not(.p-disabled)');
let order = index >= links.length ? links.length - 1 : index < 0 ? 0 : index;
this.focusedOptionIndex = links[order].getAttribute('id');
order > -1 && (this.focusedOptionIndex = links[order].getAttribute('id'));
},
toggle(event) {
if (this.overlayVisible) this.hide();