From 9560ce79b6c38772e8f836ce49f555ab4b015b29 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Tue, 9 Oct 2018 16:45:34 -0700 Subject: [PATCH] Allow base64, external, and relative logo values Fix #577 --- src/core/render/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/render/index.js b/src/core/render/index.js index 3dfabe195..6c0a51688 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -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)