We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
undefined
getScriptVersion
1 parent 6b22e08 commit 6851b8eCopy full SHA for 6851b8e
1 file changed
src/compiler/language-service.ts
@@ -82,7 +82,7 @@ export const initializeLanguageServiceInstance = (
82
getScriptFileNames: () => [...memoryCache.files.keys()],
83
getScriptVersion: (fileName: string) => {
84
const normalizedFileName = normalize(fileName)
85
- const version = memoryCache.files.get(normalizedFileName)!.version
+ const version = memoryCache.files.get(normalizedFileName)?.version
86
87
// We need to return `undefined` and not a string here because TypeScript will use
88
// `getScriptVersion` and compare against their own version - which can be `undefined`.
0 commit comments