Skip to content

Commit

Permalink
feat: Allow base64, external, and relative logo values (#642)
Browse files Browse the repository at this point in the history
Fix #577
  • Loading branch information
jhildenbiddle authored and QingWei-Li committed Oct 23, 2018
1 parent 94bc415 commit 0a0802a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ export function initRender(vm) {
}

if (config.logo) {
config.logo = getPath(vm.router.getBasePath(), config.logo)
const isBase64 = /^data:image/.test(config.logo)
const isExternal = /(?:http[s]?:)?\/\//.test(config.logo)
const isRelative = /^\./.test(config.logo)

if (!isBase64 && !isExternal && !isRelative) {
config.logo = getPath(vm.router.getBasePath(), config.logo)
}
}

html += tpl.main(config)
Expand Down

0 comments on commit 0a0802a

Please sign in to comment.