Skip to content

Commit 0a0802a

Browse files
jhildenbiddleQingWei-Li
authored andcommitted
feat: Allow base64, external, and relative logo values (#642)
Fix #577
1 parent 94bc415 commit 0a0802a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/core/render/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,13 @@ export function initRender(vm) {
232232
}
233233

234234
if (config.logo) {
235-
config.logo = getPath(vm.router.getBasePath(), config.logo)
235+
const isBase64 = /^data:image/.test(config.logo)
236+
const isExternal = /(?:http[s]?:)?\/\//.test(config.logo)
237+
const isRelative = /^\./.test(config.logo)
238+
239+
if (!isBase64 && !isExternal && !isRelative) {
240+
config.logo = getPath(vm.router.getBasePath(), config.logo)
241+
}
236242
}
237243

238244
html += tpl.main(config)

0 commit comments

Comments
 (0)