Skip to content

fix: allow null when destructuring shouldPromptBranchName

Paul Slaughter requested to merge ps-allow-null-for-destructuring into main

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:

  1. Start Web IDE
  2. Make changes
  3. Go to Source Control tab and Commit

Screenshots

Committing changes still works 👍

20240127_demo

Edited by Paul Slaughter

Merge request reports