null check before calling isDisposable (#17959)

This commit is contained in:
Alan Ren
2021-12-17 09:56:04 -08:00
committed by GitHub
parent 8aa6a8ac95
commit d8467f2c1a
3 changed files with 3 additions and 3 deletions

View File

@@ -128,7 +128,7 @@ export class TreeUpdateUtils {
const originalInput = tree.getInput();
if (treeInput !== originalInput) {
return tree.setInput(treeInput).then(async () => {
if (isDisposable(originalInput)) {
if (originalInput && isDisposable(originalInput)) {
originalInput.dispose();
}
// Make sure to expand all folders that where expanded in the previous session