Removed ts-ignore from tools.

This commit is contained in:
Piotr Janosz
2019-08-14 01:54:51 +02:00
committed by fabioberger
parent f2e0fe49f7
commit e8a2d1240f
2 changed files with 7 additions and 4 deletions

View File

@@ -58,9 +58,12 @@ export const DocsPage: React.FC<IDocsPageProps> = props => {
// If the route path includes a version, replace the initial version on path
const filePath = versions && version ? path.replace(versions[0], version) : path;
React.useEffect(() => {
void loadPageAsync(filePath);
}, [filePath]);
React.useEffect(
() => {
void loadPageAsync(filePath);
},
[filePath],
);
const loadPageAsync = async (filePath: string) => {
try {

View File

@@ -52,7 +52,7 @@ export const DocsTools: React.FC = () => {
function getUniqueContentTypes(hits: IHit[]): string[] {
const contentTypes: string[] = [];
// @ts-ignore
for (const hit of hits) {
if (!contentTypes.includes(hit.type)) {
contentTypes.push(hit.type);