From 658a1d68d985d72f3066894dbd227a3e5ef4789e Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 17 Nov 2022 04:02:53 -0500 Subject: [PATCH] Adds even more protection --- src/commands/gitCommands.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/commands/gitCommands.ts b/src/commands/gitCommands.ts index ddfc724..819c9a0 100644 --- a/src/commands/gitCommands.ts +++ b/src/commands/gitCommands.ts @@ -416,10 +416,14 @@ export class GitCommandsCommand extends Command { input.show(); - // Manually trigger `onDidChangeValue`, because the InputBox seems to fail to call it properly + // Manually trigger `onDidChangeValue`, because the InputBox fails to call it if the value is set before it is shown if (step.value != null) { // HACK: This is fragile! - (input as any)._onDidChangeValueEmitter?.fire(input.value); + try { + (input as any)._onDidChangeValueEmitter?.fire(input.value); + } catch { + debugger; + } } }); } finally {