From e02b8907fa09a0cb87eb7b34daf7db07bd7e664a Mon Sep 17 00:00:00 2001 From: Gert Hengeveld Date: Thu, 25 Nov 2021 10:24:51 +0100 Subject: [PATCH] Unlock controls when play function is finished --- lib/instrumenter/src/instrumenter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/instrumenter/src/instrumenter.ts b/lib/instrumenter/src/instrumenter.ts index da10d9ef8cf6..9ea32a34b8c9 100644 --- a/lib/instrumenter/src/instrumenter.ts +++ b/lib/instrumenter/src/instrumenter.ts @@ -138,6 +138,7 @@ export class Instrumenter { } if (newPhase === 'played') { this.setState(storyId, { + isLocked: false, isPlaying: false, isDebugging: false, forwardedException: undefined, @@ -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