File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ export class ClassCompletionItemProvider implements CompletionItemProvider {
4848
4949 fetchLocal ( key : string ) : Thenable < string > {
5050 return new Promise ( resolve => {
51- const items = new Map < string , CompletionItem > ( ) ;
52-
5351 workspace . fs . readFile ( Uri . file ( key ) ) . then ( content => {
52+ const items = new Map < string , CompletionItem > ( ) ;
53+
5454 this . parseTextToItems ( content . toString ( ) , items ) ;
5555 this . cache . set ( key , items ) ;
5656 resolve ( key ) ;
@@ -60,9 +60,9 @@ export class ClassCompletionItemProvider implements CompletionItemProvider {
6060
6161 fetchRemote ( key : string ) : Thenable < string > {
6262 return new Promise ( resolve => {
63- const items = new Map < string , CompletionItem > ( ) ;
64-
6563 fetch ( key ) . then ( res => {
64+ const items = new Map < string , CompletionItem > ( ) ;
65+
6666 if ( res . ok ) {
6767 res . text ( ) . then ( text => {
6868 this . parseTextToItems ( text , items ) ;
You can’t perform that action at this time.
0 commit comments