From cae762576d902947fbc2a301b1502ed2c5a171d4 Mon Sep 17 00:00:00 2001 From: dej611 Date: Wed, 26 Oct 2022 12:44:24 +0200 Subject: [PATCH] :wrench: Set complete also on error --- .../public/render_complete/render_complete_dispatcher.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/kibana_utils/public/render_complete/render_complete_dispatcher.ts b/src/plugins/kibana_utils/public/render_complete/render_complete_dispatcher.ts index f8fb9da67c901..597ddcaefc500 100644 --- a/src/plugins/kibana_utils/public/render_complete/render_complete_dispatcher.ts +++ b/src/plugins/kibana_utils/public/render_complete/render_complete_dispatcher.ts @@ -39,8 +39,9 @@ export class RenderCompleteDispatcher { public setEl(el?: HTMLElement) { if (this.el !== el) { - this.el = el; - this.count = 0; + this.el = el; + this.count = 0; + } if (el) this.dispatchInProgress(); } @@ -62,7 +63,7 @@ export class RenderCompleteDispatcher { public dispatchError() { if (!this.el) return; this.count++; - this.el.setAttribute('data-render-complete', 'false'); + this.el.setAttribute('data-render-complete', 'true'); this.el.setAttribute('data-rendering-count', String(this.count)); }