🐛 fix error when config.js missing

This commit is contained in:
Nate Sesti 2023-12-14 15:54:43 -08:00
parent ee38000838
commit 679a52a496
3 changed files with 5 additions and 2 deletions

View file

@ -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");
});
}

View file

@ -117,7 +117,7 @@ export function getSidebarContent(
panel.webview.postMessage({
type: data.type,
messageId: data.messageId,
message: message || {},
message: message,
});
};
switch (data.type) {

View file

@ -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);