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 c11d465aa3
commit f3cb220711
2 changed files with 3 additions and 2 deletions
+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) => {