We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b086f98 commit 6fb6fb1Copy full SHA for 6fb6fb1
src/useWithoutAct.ts
@@ -18,13 +18,16 @@ export function userEventWithoutAct(
18
async function wrapped(this: any, ...args: any[]) {
19
const config = getConfig()
20
// eslint-disable-next-line @typescript-eslint/unbound-method
21
- const orig = config.eventWrapper
+ const eventWrapper = config.eventWrapper
22
+ // eslint-disable-next-line @typescript-eslint/unbound-method
23
+ const asyncWrapper = config.asyncWrapper
24
try {
25
config.eventWrapper = cb => cb()
26
// eslint-disable-next-line @typescript-eslint/return-await
27
return await (value as Function).apply(this, args)
28
} finally {
- config.eventWrapper = orig
29
+ config.asyncWrapper = asyncWrapper
30
+ config.eventWrapper = eventWrapper
31
}
32
},
33
]
0 commit comments