diff options
author | Matt Bierner <matb@microsoft.com> | 2021-05-05 00:42:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 00:42:00 +0300 |
commit | cfa2e218100323074ac1948c885448fdf4de2a7f (patch) | |
tree | bbe5e4bb2abf9b988857da3ce928883ab8b68c18 | |
parent | 206524cbf6fbefb4f82ff20ad373c9598bc8664a (diff) |
Make sure we actually update the local resource roots (#122957)1.56.0
For #122894
Not sure why this was a no-op but it seems to prevent the webview from correctly loading preloads
-rw-r--r-- | src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts b/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts index eb1458e9484..21196f4283e 100644 --- a/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts +++ b/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts @@ -372,8 +372,11 @@ export abstract class BaseWebview<T extends HTMLElement> extends Disposable { }); } - public set localResourcesRoot(resources: URI[]) { - /** no op */ + public set localResourcesRoot(resources: readonly URI[]) { + this.content = { + ...this.content, + options: { ...this.content.options, localResourceRoots: resources } + }; } public set state(state: string | undefined) { |