Skip to content

Commit 58f6e78

Browse files
removed unnecessary casting
1 parent 2efb79e commit 58f6e78

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/rapidoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ export default class RapiDoc extends LitElement {
617617
this.selectedContentId = `${this.resolvedSpec.tags[0]?.paths[0]?.method}-${this.resolvedSpec.tags[0]?.paths[0]?.path}`;
618618
}
619619
}
620-
// Set url hash back in address bar
620+
// Set url back in address bar
621621
window.location.hash = `${this.selectedContentId}`;
622622
}
623623

src/utils/common-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ export function advanceSearch(searchVal, allSpecTags, searchOptions = []) {
115115
}
116116

117117
export function hasValidPathInUrlHash(tags) {
118-
const filterTags = tags.filter((tag) => tag.paths.filter((path) => String(window.location.hash.substring(1)) === `${path.method}-${path.path.replace(invalidCharsRegEx, '-')}`).length > 0);
118+
const filterTags = tags.filter((tag) => tag.paths.filter((path) => window.location.hash.substring(1) === `${path.method}-${path.path.replace(invalidCharsRegEx, '-')}`).length > 0);
119119
return filterTags.length > 0;
120120
}

0 commit comments

Comments
 (0)