From c882d8d30d6e28f0ab86e05883bf933f79940562 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 3 May 2023 00:33:24 -0400 Subject: [PATCH] Resets ready flag only if we were already ready --- src/webviews/webviewController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webviews/webviewController.ts b/src/webviews/webviewController.ts index 3fc2969..171bbaf 100644 --- a/src/webviews/webviewController.ts +++ b/src/webviews/webviewController.ts @@ -275,6 +275,7 @@ export class WebviewController< this.provider.onRefresh?.(force); // Mark the webview as not ready, until we know if we are changing the html + const wasReady = this._ready; this._ready = false; const html = await this.getHtml(this.webview); @@ -285,7 +286,9 @@ export class WebviewController< // If we aren't changing the html, mark the webview as ready again if (this.webview.html === html) { - this._ready = true; + if (wasReady) { + this._ready = true; + } return; }