Remove dependency that was causing effect to re-execute infinitely. (#54160)

This commit is contained in:
Justin Kambic 2020-01-07 14:20:02 -05:00 committed by GitHub
parent 9eb0c77318
commit 7b33fd318c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,5 +16,6 @@ export const useIndexPattern = <T>(setIndexPattern: Dispatch<T>) => {
setIndexPattern(await fetch('/api/uptime/index_pattern', { method: 'GET' }));
}
getIndexPattern();
}, [core.services.http, setIndexPattern]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [core.services.http]);
};