mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 18:14:07 +03:00
Activate first menu item if first cat is headless
This commit is contained in:
parent
8731adf2a3
commit
82f4598a5b
|
@ -200,6 +200,9 @@ export class MenuService {
|
||||||
|
|
||||||
setActiveByHash(hash) {
|
setActiveByHash(hash) {
|
||||||
if (!hash) {
|
if (!hash) {
|
||||||
|
if (this.categories[0].headless) {
|
||||||
|
this.activate(0, 0);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let catIdx, methodIdx;
|
let catIdx, methodIdx;
|
||||||
|
|
|
@ -28,6 +28,7 @@ export interface MenuCategory {
|
||||||
empty?: string;
|
empty?: string;
|
||||||
virtual?: boolean;
|
virtual?: boolean;
|
||||||
ready: boolean;
|
ready: boolean;
|
||||||
|
headless: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// global var for this module
|
// global var for this module
|
||||||
|
|
Loading…
Reference in New Issue
Block a user