File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -154,12 +154,7 @@ class HelpCompletionProvider {
154154 triggerPosition : triggerStartPos ,
155155 blockComment : this . triggerFinderBlockComment . found
156156 } ) . 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 ) {
163158 return ;
164159 }
165160
@@ -169,7 +164,7 @@ class HelpCompletionProvider {
169164
170165 // Trim the leading whitespace (used by the rule for indentation) as VSCode takes care of the indentation.
171166 // 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 ) ) ;
173168 editor . insertSnippet ( new SnippetString ( text ) , replaceRange ) ;
174169 } ) ;
175170 }
You can’t perform that action at this time.
0 commit comments