fix: allow null when destructuring shouldPromptBranchName
This MR resolves Web IDE: Cannot destructure property 'shouldPro... (gitlab#438833 - closed) by allowing the commit
command to accept null
as the first argument.
The error coming up was Cannot destructure property 'shouldPromptBranchName' of '(intermediate value)(intermediate value)(intermediate value)' as it is null.
. I haven't been able to recreate this error directly, but it seems that sometimes vscode
can call out commit
command with null
as the first argument. This will cause our code to blow up when we try to destructure shouldPromptBranchName
out of null
.
How to test?
It's hard to recreate the original issue, but reports with steps in the issue.
To ensure everything still works as expected:
- Start Web IDE
- Make changes
- Go to Source Control tab and Commit
Screenshots
Committing changes still works
Edited by Paul Slaughter