We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba98cbb commit 1a7a587Copy full SHA for 1a7a587
src/services/services.ts
@@ -276,7 +276,10 @@ namespace ts {
276
}
277
278
public getText(sourceFile?: SourceFile): string {
279
- return (sourceFile || this.getSourceFile()).text.substring(this.getStart(), this.getEnd());
+ if (!sourceFile) {
280
+ sourceFile = this.getSourceFile();
281
+ }
282
+ return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd());
283
284
285
public getChildCount(): number {
0 commit comments