don't use crypto.randomUUID() because older browsers may not support it

This commit is contained in:
evanpelle
2024-12-18 07:54:54 -08:00
parent 70fefe347b
commit f87065849d
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
</svg>
</a>
<h1 class="text-7xl sm:text-5xl md:text-6xl lg:text-7xl mb-2">OpenFront.io</h1>
<h2 class="text-3xl sm:text-4xl md:text-5xl lg:text-6xl mb-4">(v0.12.5)</h2>
<h2 class="text-3xl sm:text-4xl md:text-5xl lg:text-6xl mb-4">(v0.12.6)</h2>
<div class="flex justify-center items-start">
<div class="w-full max-w-3xl p-4 space-y-4">
<br />
+2 -1
View File
@@ -1,6 +1,7 @@
import { Cell, Game, GameMap, TerrainTile, TerrainType, Tile } from "../game/Game";
import { AStar, PathFindResultType } from "../pathfinding/AStar";
import { MiniAStar } from "../pathfinding/MiniAStar";
import { generateID } from "../Util";
export class WorkerClient {
@@ -61,7 +62,7 @@ export class ParallelAStar implements AStar {
) { }
findPath(): Promise<void> {
const requestId = crypto.randomUUID();
const requestId = generateID()
this.promise = new Promise((resolve, reject) => {
const handler = (e: MessageEvent) => {