Files
2026-05-27 23:47:53 +01:00

13 lines
449 B
TypeScript

// React-tier polyfills. Base webcrypto comes from `@suaveplan/testing/polyfills`;
// this file adds the `IS_REACT_ACT_ENVIRONMENT` flag React DOM looks for when
// state updates happen outside an explicit `act(...)` wrapper.
interface ReactActEnvWindow {
IS_REACT_ACT_ENVIRONMENT?: boolean;
}
const win = globalThis as unknown as ReactActEnvWindow;
if (win.IS_REACT_ACT_ENVIRONMENT === undefined) {
win.IS_REACT_ACT_ENVIRONMENT = true;
}