Skip to content

Commit

Permalink
(fix) TS Issues 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-xus committed Sep 30, 2024
1 parent e023433 commit 2d7b73a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vite.svg,1727641571382,9de4d3c4e50257d9874f07e9efc929efefc85e51f931a9af716f9a7ebb23ef68
index.html,1727641707351,a5349940f6e386b5b146d7e1f1e60489bac74e9ca294f4ac6fa5531edac0dbe3
assets/index-15V7zmlS.css,1727641571699,edf5f2ad6b4c5d9666653b27a094eaae6c12f6a1c3079dc1af7f4cc03ed8cf72
assets/index-Cqf6BsXP.js,1727641571702,9ace91be9f8b68af16ffc0808d8fbbf7eba2ffd2cd2adf3a74e6b2e313b5af91
vite.svg,1727642014227,9de4d3c4e50257d9874f07e9efc929efefc85e51f931a9af716f9a7ebb23ef68
index.html,1727642014563,7c628324ad7cecb9242b589addebd868bff53e6c8944235826deebb6472387af
assets/index-Cqf6BsXP.js,1727642014567,9ace91be9f8b68af16ffc0808d8fbbf7eba2ffd2cd2adf3a74e6b2e313b5af91
assets/index-15V7zmlS.css,1727642014563,edf5f2ad6b4c5d9666653b27a094eaae6c12f6a1c3079dc1af7f4cc03ed8cf72
18 changes: 11 additions & 7 deletions src/utility/States.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,17 @@ export function StatesTablemDFA({ automata }: StatesTableProps) {
([label, identicals]) => (
<li key={label} className="text-md">
<span className="font-bold">{label}</span> is identical to{" "}
{identicals.map((identical, index, array) => (
<React.Fragment key={index}>
<span className="font-bold">{identical}</span>
{index < array.length - 2 && ", "}
{index === array.length - 2 && " and "}
</React.Fragment>
))}
{Array.isArray(identicals) ? (
identicals.map((identical, index, array) => (
<React.Fragment key={index}>
<span className="font-bold">{identical}</span>
{index < array.length - 2 && ", "}
{index === array.length - 2 && " and "}
</React.Fragment>
))
) : (
<span className="font-bold">N/A</span> // or any other placeholder you'd like
)}
.
</li>
),
Expand Down

0 comments on commit 2d7b73a

Please sign in to comment.