Skip to content

Commit 658a1d6

Browse files
committed
Adds even more protection
1 parent cee2da1 commit 658a1d6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/commands/gitCommands.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,14 @@ export class GitCommandsCommand extends Command {
416416

417417
input.show();
418418

419-
// Manually trigger `onDidChangeValue`, because the InputBox seems to fail to call it properly
419+
// Manually trigger `onDidChangeValue`, because the InputBox fails to call it if the value is set before it is shown
420420
if (step.value != null) {
421421
// HACK: This is fragile!
422-
(input as any)._onDidChangeValueEmitter?.fire(input.value);
422+
try {
423+
(input as any)._onDidChangeValueEmitter?.fire(input.value);
424+
} catch {
425+
debugger;
426+
}
423427
}
424428
});
425429
} finally {

0 commit comments

Comments
 (0)