Skip to content

Commit 7244cdd

Browse files
committed
Stops looking for bootstrap more than once
1 parent dafa74d commit 7244cdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webviews/webviewEditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export abstract class WebviewEditor<TBootstrap> extends Disposable {
102102
let html = (await this.getHtml())
103103
.replace(/{{root}}/g, Uri.file(Container.context.asAbsolutePath('.')).with({ scheme: 'vscode-resource' }).toString());
104104
if (html.includes('\'{{bootstrap}}\'')) {
105-
html = html.replace(/'{{bootstrap}}'/g, JSON.stringify(this.getBootstrap()));
105+
html = html.replace('\'{{bootstrap}}\'', JSON.stringify(this.getBootstrap()));
106106
}
107107

108108
if (this._panel === undefined) {
@@ -149,7 +149,7 @@ export abstract class WebviewEditor<TBootstrap> extends Disposable {
149149

150150
const doc = await workspace.openTextDocument(Container.context.asAbsolutePath(this.filename));
151151
return doc.getText();
152-
}
152+
}
153153

154154
private postMessage(message: Message, invalidates: 'all' | 'config' = 'all') {
155155
if (this._panel === undefined) return false;

0 commit comments

Comments
 (0)