File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed
.vitepress/theme/nativescript-theme Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -6286,15 +6286,20 @@ var script$c = defineComponent({
6286
6286
}
6287
6287
6288
6288
function getTargetUrl ( url ) {
6289
- if ( url . includes ( 'api-reference' ) ) {
6290
- return url
6291
- }
6289
+ var res = ( function ( ) {
6290
+ if ( url . includes ( 'api-reference' ) ) {
6291
+ return url
6292
+ }
6292
6293
6293
- if ( url . startsWith ( window . ___location . origin ) ) {
6294
- return getRelativePath ( url )
6295
- }
6294
+ if ( url . startsWith ( 'http' ) ) {
6295
+ return getRelativePath ( url )
6296
+ }
6296
6297
6297
- return url
6298
+ return url
6299
+ } ) ( )
6300
+
6301
+ console . log ( "getTargetUrl('" . concat ( url , "') -> " ) . concat ( res ) )
6302
+ return res
6298
6303
}
6299
6304
6300
6305
function initialize ( userOptions ) {
@@ -6315,6 +6320,13 @@ var script$c = defineComponent({
6315
6320
router . go ( targetUrl )
6316
6321
} ,
6317
6322
} ,
6323
+ transformItems : function transformItems ( items ) {
6324
+ return items . map ( function ( item ) {
6325
+ return Object . assign ( { } , item , {
6326
+ url : getTargetUrl ( item . url ) ,
6327
+ } )
6328
+ } )
6329
+ } ,
6318
6330
hitComponent : function hitComponent ( _ref2 ) {
6319
6331
var hit = _ref2 . hit ,
6320
6332
children = _ref2 . children
You can’t perform that action at this time.
0 commit comments