mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-23 02:25:40 +00:00
don't use crypto.randomUUID() because older browsers may not support it
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user