From 169147ba8c90ece8b36522be447d26d289ddbfcb Mon Sep 17 00:00:00 2001 From: Shahzad Date: Fri, 3 Jul 2020 10:24:15 +0200 Subject: [PATCH] [Uptime] Prevent duplicate requests on load for index status (#70585) --- x-pack/plugins/uptime/public/state/effects/index_status.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/uptime/public/state/effects/index_status.ts b/x-pack/plugins/uptime/public/state/effects/index_status.ts index 793a671f5fed8..a4b85312849a2 100644 --- a/x-pack/plugins/uptime/public/state/effects/index_status.ts +++ b/x-pack/plugins/uptime/public/state/effects/index_status.ts @@ -4,13 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { takeLatest } from 'redux-saga/effects'; +import { takeLeading } from 'redux-saga/effects'; import { indexStatusAction } from '../actions'; import { fetchIndexStatus } from '../api'; import { fetchEffectFactory } from './fetch_effect'; export function* fetchIndexStatusEffect() { - yield takeLatest( + yield takeLeading( indexStatusAction.get, fetchEffectFactory(fetchIndexStatus, indexStatusAction.success, indexStatusAction.fail) );