Skip to content

Commit 09d9bba

Browse files
committed
update location hash when expand/collapse endpoints
1 parent 0867ffa commit 09d9bba

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/rapidoc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ export default class RapiDoc extends LitElement {
9898
if (!this.defaultSchemaTab || !'example model'.includes(this.defaultSchemaTab)) { this.defaultSchemaTab = 'model'; }
9999
if (!this.schemaExpandLevel || this.schemaExpandLevel < 1) { this.schemaExpandLevel = 99999; }
100100
if (!this.schemaDescriptionExpanded || !'true false'.includes(this.schemaDescriptionExpanded)) { this.schemaDescriptionExpanded = 'false'; }
101-
debugger;
102101
if (!this.responseAreaHeight) {
103102
this.responseAreaHeight = '300px';
104103
}

src/templates/endpoint-template.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { callbackTemplate } from '@/templates/expanded-endpoint-template';
77

88
/* eslint-disable indent */
99
function toggleExpand(path) {
10+
window.location.href = `${window.location.href.split('#')[0]}#${path.method}-${path.path.replace(/[\s#:?&=]/g, '-')}`;
1011
if (path.expanded) {
1112
path.expanded = false; // collapse
1213
} else {

0 commit comments

Comments
 (0)