fix(cp-frontend): don't fetchMoreMetrics if it's still loading

This commit is contained in:
Sérgio Ramos 2017-09-06 11:46:45 +01:00
parent f5d9085531
commit 3c3f6f1c65
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ export const withServiceMetricsPolling = ({
const { loading, fetchMoreMetrics } = this.props;
const previousEnd = getPreviousEnd(this.props);
if (previousEnd) {
if (!loading && previousEnd) {
fetchMoreMetrics(previousEnd);
}
}, pollingInterval); // TODO this is the polling interval - think about amount is the todo I guess...