🐛 fix error when config.js missing
This commit is contained in:
parent
ee38000838
commit
679a52a496
3 changed files with 5 additions and 2 deletions
|
|
@ -58,6 +58,6 @@ export function startProxy() {
|
|||
console.log(`Proxy server is running on port ${PROXY_PORT}`);
|
||||
});
|
||||
server.on("error", (e) => {
|
||||
console.log("Proxy server already running on 65433: ", e.message);
|
||||
console.log("Proxy server already running on port 65433");
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export function getSidebarContent(
|
|||
panel.webview.postMessage({
|
||||
type: data.type,
|
||||
messageId: data.messageId,
|
||||
message: message || {},
|
||||
message: message,
|
||||
});
|
||||
};
|
||||
switch (data.type) {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ class VsCodeIde implements IDE {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
if (!fs.existsSync(getConfigJsPath())) {
|
||||
return undefined;
|
||||
}
|
||||
const configJsString = fs.readFileSync(getConfigJsPath(), "utf8");
|
||||
|
||||
var dataUrl = "data:text/javascript;base64," + btoa(configJsString);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue