File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,21 @@ export class Autolinks implements Disposable {
6363 if ( configuration . changed ( e , 'autolinks' ) ) {
6464 const autolinks = configuration . get ( 'autolinks' ) ;
6565 // Since VS Code's configuration objects are live we need to copy them to avoid writing back to the configuration
66- this . _references = autolinks != null ? autolinks . map ( a => ( { ...a } ) ) : [ ] ;
66+ this . _references =
67+ autolinks
68+ ?. filter ( a => a . prefix && a . url )
69+ /**
70+ * Only allow properties defined by {@link AutolinkReference}
71+ */
72+ ?. map ( a => ( {
73+ prefix : a . prefix ,
74+ url : a . url ,
75+ title : a . title ,
76+ alphanumeric : a . alphanumeric ,
77+ ignoreCase : a . ignoreCase ,
78+ type : a . type ,
79+ description : a . description ,
80+ } ) ) ?? [ ] ;
6781 }
6882 }
6983
You can’t perform that action at this time.
0 commit comments