File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function qualifyURL(url) {
29
29
return url ;
30
30
}
31
31
32
- function isExternal ( url ) {
32
+ export function isExternal ( url ) {
33
33
url = qualifyURL ( url ) ;
34
34
url = new URL ( url ) ;
35
35
return url . origin !== location . origin ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { getPath, isAbsolutePath } from '../router/util';
9
9
import { isMobile , inBrowser } from '../util/env' ;
10
10
import { isPrimitive } from '../util/core' ;
11
11
import { scrollActiveSidebar } from '../event/scroll' ;
12
+ import { isExternal } from '../fetch' ;
12
13
import { Compiler } from './compiler' ;
13
14
import * as tpl from './tpl' ;
14
15
import { prerenderEmbed } from './embed' ;
@@ -259,10 +260,9 @@ export function initRender(vm) {
259
260
260
261
if ( config . logo ) {
261
262
const isBase64 = / ^ d a t a : i m a g e / . test ( config . logo ) ;
262
- const isExternal = / (?: h t t p [ s ] ? : ) ? \/ \/ / . test ( config . logo ) ;
263
263
const isRelative = / ^ \. / . test ( config . logo ) ;
264
264
265
- if ( ! isBase64 && ! isExternal && ! isRelative ) {
265
+ if ( ! isBase64 && ! isExternal ( config . logo ) && ! isRelative ) {
266
266
config . logo = getPath ( vm . router . getBasePath ( ) , config . logo ) ;
267
267
}
268
268
}
You can’t perform that action at this time.
0 commit comments