fix safari incompatibility

This commit is contained in:
vcoppe
2025-11-13 09:06:00 +01:00
parent 2e3b22c5fa
commit 8f595fbc7b

View File

@@ -30,8 +30,8 @@ export class MapCursor {
constructor() { constructor() {
this._states = writable(new Set()); this._states = writable(new Set());
this._states.subscribe((states) => { this._states.subscribe((states) => {
let state = states.entries().reduce((max, entry) => { let state = Array.from(states.values()).reduce((max, value) => {
return entry[0] > max ? entry[0] : max; return value > max ? value : max;
}, MapCursorState.DEFAULT); }, MapCursorState.DEFAULT);
let canvas = get(map)?.getCanvas(); let canvas = get(map)?.getCanvas();
if (canvas) { if (canvas) {