fix few bugs

This commit is contained in:
Olivier Gagnon
2021-11-22 11:36:13 -05:00
parent 626c1b49eb
commit 42518c3caa
18 changed files with 105 additions and 82 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ interface IServerProps {
function ServerAccordion(props: IServerProps): React.ReactElement {
const server = GetServer(props.hostname);
if (server === null) throw new Error("server should not be null");
if (server === null) throw new Error(`server '${props.hostname}' should not be null`);
let totalSize = 0;
for (const f of server.scripts) {
totalSize += f.code.length;
@@ -100,8 +100,8 @@ interface IProps {
export function FileDiagnosticModal(props: IProps): React.ReactElement {
const keys: string[] = [];
for (const key in GetAllServers()) {
keys.push(key);
for (const key of GetAllServers()) {
keys.push(key.hostname);
}
return (