Compare commits
1 Commits
main
...
rh/repro-e
| Author | SHA1 | Date |
|---|---|---|
|
|
fff1baa904 |
|
|
@ -358,6 +358,11 @@ function safelyCallDestroy(
|
|||
nearestMountedAncestor: Fiber | null,
|
||||
destroy: () => void,
|
||||
) {
|
||||
if (destroy.CALLED) {
|
||||
throw new Error('CALLED');
|
||||
}
|
||||
destroy.CALLED = true;
|
||||
|
||||
try {
|
||||
destroy();
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -1863,6 +1863,9 @@ function pushEffect(
|
|||
destroy: (() => void) | void,
|
||||
deps: Array<mixed> | void | null,
|
||||
): Effect {
|
||||
if (destroy && destroy.CALLED) {
|
||||
throw new Error('CALLED ' + destroy.NAME);
|
||||
}
|
||||
const effect: Effect = {
|
||||
tag,
|
||||
create,
|
||||
|
|
|
|||
|
|
@ -445,5 +445,57 @@ Random seed is ${SEED}
|
|||
</React.Suspense>,
|
||||
);
|
||||
});
|
||||
|
||||
it('6', async () => {
|
||||
const {Text, Container, testResolvedOutput} = createFuzzer();
|
||||
try {
|
||||
await testResolvedOutput(
|
||||
<React.Fragment>
|
||||
<Text
|
||||
initialDelay={0}
|
||||
text="A"
|
||||
updates={[
|
||||
{
|
||||
beginAfter: 0,
|
||||
suspendFor: 1,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<Container
|
||||
name="X"
|
||||
updates={[
|
||||
{
|
||||
remountAfter: 0,
|
||||
},
|
||||
{
|
||||
remountAfter: 0,
|
||||
},
|
||||
]}>
|
||||
<Container
|
||||
name="Y"
|
||||
updates={[
|
||||
{
|
||||
remountAfter: 0,
|
||||
},
|
||||
]}>
|
||||
<Text
|
||||
initialDelay={0}
|
||||
text="B"
|
||||
updates={[
|
||||
{
|
||||
beginAfter: 0,
|
||||
suspendFor: 1,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Container>
|
||||
</Container>
|
||||
</React.Fragment>,
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(Scheduler.unstable_clearLog());
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue