backport fixes from PR#10452 missing in merge e839b6307

This commit is contained in:
Martin Raifer
2024-10-16 13:47:46 +02:00
parent 108893c624
commit b4e55c2027
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import type { FetchMockStatic } from 'fetch-mock';
declare global {
declare var iD: typeof import('.');
declare var d3: import('d3');
declare var d3: typeof import('d3');
declare var fetchMock: FetchMockStatic;
declare var before: typeof beforeEach;
declare var after: typeof afterEach;

View File

@@ -131,10 +131,11 @@ cached.deprecated = [];
// Initializing `coreContext` initializes `_uploader`, which tries loading:
cached.discarded = {};
// @ts-expect-error
window.d3 = iD.d3; // Remove this if we can avoid exporting all of d3.js
// @ts-expect-error
delete window.PointerEvent; // force the browser to use mouse events
delete window.PointerEvent; // force the browser to use mouse events
// some sticky fallbacks
const capabilities = `<?xml version="1.0" encoding="UTF-8"?>