add special case for vscode instead

This commit is contained in:
Simon Knott 2024-11-08 13:42:12 +01:00
parent cb76898d65
commit a8dbc0fdd8
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -113,8 +113,10 @@ async function doFetch(event: FetchEvent): Promise<Response> {
} }
if (!client) { if (!client) {
// expected client to be defined for all non-iframe requests. something went wrong // vscode webview doesn't sent clientId under some circumstances
return fetch(event.request); if (url.pathname.endsWith('embedded.html'))
return fetch(event.request);
throw new Error('expected client to be defined for all non-iframe requests. something went wrong');
} }
if (relativePath === '/contexts') { if (relativePath === '/contexts') {