diff --git a/src/services/shims.ts b/src/services/shims.ts index 43e7de79fa4..84580470b27 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -248,6 +248,8 @@ namespace ts { } public dispose(): void { + // if scriptSnapshotShim is a COM object then property check becomes method call with no arguments + // 'in' does not have this effect if ("dispose" in this.scriptSnapshotShim) { this.scriptSnapshotShim.dispose(); }