Skip to content

Commit

Permalink
Merge pull request #16784 from storybookjs/debugger-controls
Browse files Browse the repository at this point in the history
Interactions: Unlock controls when play function is finished
  • Loading branch information
ghengeveld committed Nov 25, 2021
2 parents 69e9742 + e02b890 commit 1dde26d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/instrumenter/src/instrumenter.ts
Expand Up @@ -138,6 +138,7 @@ export class Instrumenter {
}
if (newPhase === 'played') {
this.setState(storyId, {
isLocked: false,
isPlaying: false,
isDebugging: false,
forwardedException: undefined,
Expand Down Expand Up @@ -489,7 +490,7 @@ export class Instrumenter {
update(call: Call) {
clearTimeout(this.getState(call.storyId).syncTimeout);
this.channel.emit(EVENTS.CALL, call);
this.setState(call.storyId, ({ calls, isLocked }) => {
this.setState(call.storyId, ({ calls }) => {
// Omit earlier calls for the same ID, which may have been superceded by a later invocation.
// This typically happens when calls are part of a callback which runs multiple times.
const callsById = calls
Expand Down

0 comments on commit 1dde26d

Please sign in to comment.