Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 7a2a160

Browse files
committed
Remain in started when interupting a started transition
1 parent 5c5a5af commit 7a2a160

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/csstransitionstate.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,19 +392,19 @@ describe("csstransitionstate.ts", () => {
392392
const id = StateID.EnterStarted;
393393
const {state, pending} = reduce({ id }, actionID, {});
394394
assert.isUndefined(pending);
395-
assert.strictEqual(state.id, StateID.LeaveTriggered);
395+
assert.strictEqual(state.id, StateID.LeaveStarted);
396396
});
397397
it("should interrupt leave started", () => {
398398
const id = StateID.LeaveStarted;
399399
const {state, pending} = reduce({ id }, actionID, {});
400400
assert.isUndefined(pending);
401-
assert.strictEqual(state.id, StateID.EnterTriggered);
401+
assert.strictEqual(state.id, StateID.EnterStarted);
402402
});
403403
it("should interrupt appear started", () => {
404404
const id = StateID.AppearStarted;
405405
const {state, pending} = reduce({ id }, actionID, {});
406406
assert.isUndefined(pending);
407-
assert.strictEqual(state.id, StateID.LeaveTriggered);
407+
assert.strictEqual(state.id, StateID.LeaveStarted);
408408
});
409409
});
410410
});

src/csstransitionstate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ export function reduce(
224224
return { state: defaultState(props) };
225225
case StateID.AppearStarted:
226226
case StateID.EnterStarted:
227-
return { state: leaveTriggeredState(props) };
227+
return { state: leaveStartedState(props) };
228228
case StateID.LeaveStarted:
229-
return { state: enterTriggeredState(props) };
229+
return { state: enterStartedState(props) };
230230
default:
231231
throw new Error("invalid state transition");
232232
}

0 commit comments

Comments
 (0)