File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -154,12 +154,7 @@ class HelpCompletionProvider {
154
154
triggerPosition : triggerStartPos ,
155
155
blockComment : this . triggerFinderBlockComment . found
156
156
} ) . then ( result => {
157
- if ( result === undefined ) {
158
- return ;
159
- }
160
-
161
- let content = result . content ;
162
- if ( content === undefined ) {
157
+ if ( result == null || result . content == null ) {
163
158
return ;
164
159
}
165
160
@@ -169,7 +164,7 @@ class HelpCompletionProvider {
169
164
170
165
// Trim the leading whitespace (used by the rule for indentation) as VSCode takes care of the indentation.
171
166
// Trim the last empty line and join the strings.
172
- let text = content . map ( x => x . trimLeft ( ) ) . slice ( 0 , - 1 ) . join ( this . getEOL ( doc . eol ) ) ;
167
+ let text = result . content . map ( x => x . trimLeft ( ) ) . slice ( 0 , - 1 ) . join ( this . getEOL ( doc . eol ) ) ;
173
168
editor . insertSnippet ( new SnippetString ( text ) , replaceRange ) ;
174
169
} ) ;
175
170
}
You can’t perform that action at this time.
0 commit comments