Skip to content

Commit 084b691

Browse files
committed
keep writable at cleanup
1 parent 32daf10 commit 084b691

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/disableActEnvironment.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ export function disableActEnvironment({
7979
cleanupFns.push(() => {
8080
Object.defineProperty(typedGlobal, 'IS_REACT_ACT_ENVIRONMENT', {
8181
value: previous,
82+
writable: true,
83+
configurable: true,
8284
})
8385
})
8486
Object.defineProperty(
@@ -93,8 +95,16 @@ export function disableActEnvironment({
9395
// eslint-disable-next-line @typescript-eslint/unbound-method
9496
const {asyncWrapper, eventWrapper} = config
9597
cleanupFns.push(() => {
96-
Object.defineProperty(config, 'asyncWrapper', {value: asyncWrapper})
97-
Object.defineProperty(config, 'eventWrapper', {value: eventWrapper})
98+
Object.defineProperty(config, 'asyncWrapper', {
99+
value: asyncWrapper,
100+
writable: true,
101+
configurable: true,
102+
})
103+
Object.defineProperty(config, 'eventWrapper', {
104+
value: eventWrapper,
105+
writable: true,
106+
configurable: true,
107+
})
98108
})
99109

100110
Object.defineProperty(

0 commit comments

Comments
 (0)