Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deleteDeclaration
: don't crash on the top node.
A misbehaved client can sometimes cause the server to reach `deleteDeclaration` with the SourceFile, and it will crash due to no `node.parent`. I couldn't find a good way to create a test for it, but I could trigger it manually by having a file with just a `,`, and sending an explicit `getCodeFixes` command to the server with `errorCodes: [6133]`. I can only guess some scenario in which Emacs or other editors could lead to that, but it's easy to just avoid the crash instead. (Doing the default of deleting the whole thing -- not really important since it's a broken client situation anyway--?) Fixes microsoft#33726
- Loading branch information