File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,22 @@ function imageUri(searchUri: vscode.Uri, imageLink: string) {
2020}
2121
2222function getUri ( filepath : string , filename : string ) {
23- let extension = vscode . extensions . getExtension ( EXTENTION_ID ) ;
23+ const extension = vscode . extensions . getExtension ( EXTENTION_ID ) ;
2424 if ( extension ) {
25- let extPath = extension . extensionPath ;
25+ const extPath = extension . extensionPath ;
2626
2727 // set special chema for resource:
2828 // https://code.visualstudio.com/api/extension-guides/webview#loading-local-content
29- let uri = vscode . Uri . file ( path . join ( extPath , filepath , filename ) ) . with ( { scheme : 'vscode-resource' } ) ;
30- return uri ;
29+ const uri = vscode . Uri . file ( path . join ( extPath , filepath , filename ) )
30+ return uri
3131 }
3232}
3333
3434function emoticonUri ( emoticonFile : string ) {
35- return getUri ( EMOTICON_PATH , emoticonFile ) ;
35+ const emoticonUrl = getUri ( EMOTICON_PATH , emoticonFile )
36+ if ( emoticonUrl ) {
37+ return emoticonUrl . with ( { scheme : 'vscode-resource' } ) ;
38+ }
3639}
3740
3841export function cssUri ( cssFile : string ) {
You can’t perform that action at this time.
0 commit comments