We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14e6ad3 commit d628c3bCopy full SHA for d628c3b
1 file changed
extensions/image-preview/src/preview.ts
@@ -147,10 +147,11 @@ class Preview extends Disposable implements vscode.WebviewEditorEditingCapabilit
147
}
148
}));
149
150
- (async () => {
151
- const { size } = await vscode.workspace.fs.stat(resource);
+ vscode.workspace.fs.stat(resource).then(({ size }) => {
152
this._imageBinarySize = size;
153
- })();
+ this.update();
+ });
154
+
155
this.render();
156
this.update();
157
this.webviewEditor.webview.postMessage({ type: 'setActive', value: this.webviewEditor.active });
0 commit comments