Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Bugfix HTML header
Browse files Browse the repository at this point in the history
  • Loading branch information
maakbaas committed Apr 29, 2021
1 parent 903c27b commit 7469a98
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 128 deletions.
14 changes: 10 additions & 4 deletions gui/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,16 @@ function Root() {
setConfigData(bin2obj(data, Config));
});
}

const projectName = configData["projectName"] || Config.find(entry => entry.name === "projectName") ? Config.find(entry => entry.name === "projectName").value : "ESP8266";
const projectVersion = configData["projectVersion"] || Config.find(entry => entry.name === "projectVersion") ? Config.find(entry => entry.name === "projectVersion").value : "";

console.log(configData["projectName"]);
let projectName = configData["projectName"];
if (typeof projectName === "undefined") {
projectName = Config.find(entry => entry.name === "projectName") ? Config.find(entry => entry.name === "projectName").value : "ESP8266";
}
let projectVersion = configData["projectVersion"];
if (typeof projectVersion === "undefined") {
projectVersion = Config.find(entry => entry.name === "projectVersion") ? Config.find(entry => entry.name === "projectVersion").value : "";
}

return <><GlobalStyle />

<BrowserRouter>
Expand Down
Loading

0 comments on commit 7469a98

Please sign in to comment.