Fix loading of local resources in webview

This commit is contained in:
Matt Bierner
2018-06-04 09:32:49 -07:00
parent 1579821005
commit 07521ebaa4

View File

@@ -77,7 +77,10 @@ export class MainThreadWebviews implements MainThreadWebviewsShape, WebviewReviv
mainThreadShowOptions.group = viewColumnToEditorGroup(this._editorGroupService, showOptions.viewColumn);
}
const webview = this._webviewService.createWebview(MainThreadWebviews.viewType, title, mainThreadShowOptions, options, URI.revive(extensionLocation), this.createWebviewEventDelegate(handle));
const webview = this._webviewService.createWebview(MainThreadWebviews.viewType, title, mainThreadShowOptions, {
...options,
localResourceRoots: Array.isArray(options.localResourceRoots) ? options.localResourceRoots.map(URI.revive) : undefined
}, URI.revive(extensionLocation), this.createWebviewEventDelegate(handle));
webview.state = {
viewType: viewType,
state: undefined