File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 18
18
"body" : " pragma abicoder v2;"
19
19
},
20
20
"import contract" : {
21
- "prefix" : " imp" ,
22
- "body" : " import '${1:contract}';"
21
+ "prefix" : " import" ,
22
+ "body" : " import " ,
23
+ "description" : " Press Ctrl+Space to autocomplete imports"
23
24
},
24
25
"contract declaration" : {
25
26
"prefix" : " con" ,
Original file line number Diff line number Diff line change @@ -635,9 +635,9 @@ export class SolidityDefinitionProvider {
635
635
private resolveImportPath ( importPath : string , contract : Contract ) : string {
636
636
if ( contract . isImportLocal ( importPath ) ) {
637
637
return contract . formatContractPath ( path . resolve ( path . dirname ( contract . absolutePath ) , importPath ) ) ;
638
- } else if ( this . project !== undefined ) {
638
+ } else if ( this . project !== undefined && this . project !== null ) {
639
639
const remapping = this . project . findImportRemapping ( importPath ) ;
640
- if ( remapping !== undefined ) {
640
+ if ( remapping !== undefined && remapping != null ) {
641
641
return contract . formatContractPath ( remapping . resolveImport ( importPath ) ) ;
642
642
} else {
643
643
const depPack = this . project . findDependencyPackage ( importPath ) ;
You can’t perform that action at this time.
0 commit comments