Skip to content

Commit

Permalink
Display "N/A" when no Station name is provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
fishylunar committed Nov 25, 2024
1 parent 0d1a3db commit eee2fbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/logic/Odin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ export async function getEvents(): Promise<OdinEvents> {
return div.textContent || "";
};

let station = decode(cells[1].innerHTML);
if (station === "") {
station = "N/A";
}

return {
responder: decode(cells[0].innerHTML),
station: decode(cells[1].innerHTML),
station: station,
timestamp: decode(cells[2].innerHTML),
message: decode(cells[3].innerHTML),
};
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"lib": ["ES6"],
"module": "ESNext",
"skipLibCheck": true,

Expand Down

0 comments on commit eee2fbb

Please sign in to comment.