File tree Expand file tree Collapse file tree
src/server/typingsInstaller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ namespace ts.server.typingsInstaller {
5555 try {
5656 if ( fileExists ) {
5757 const content = < TypeDeclarationTimestampFile > JSON . parse ( host . readFile ( typeDeclarationTimestampFilePath ) ) ;
58- return content . entries ;
58+ return content . entries || { } ;
5959 }
6060 else {
6161 host . writeFile ( typeDeclarationTimestampFilePath , "{}" ) ;
@@ -247,10 +247,11 @@ namespace ts.server.typingsInstaller {
247247 continue ;
248248 }
249249 const existingTypingFile = this . packageNameToTypingLocation . get ( packageName ) ;
250- if ( existingTypingFile . typingLocation === typingFile ) {
251- continue ;
252- }
253250 if ( existingTypingFile ) {
251+ if ( existingTypingFile . typingLocation === typingFile ) {
252+ continue ;
253+ }
254+
254255 if ( this . log . isEnabled ( ) ) {
255256 this . log . writeLine ( `New typing for package ${ packageName } from '${ typingFile } ' conflicts with existing typing file '${ existingTypingFile } '` ) ;
256257 }
You can’t perform that action at this time.
0 commit comments