fixed favicon not rendering when not visiting base url
This commit is contained in:
parent
85b184ce5e
commit
9db2f1fa8c
1 changed files with 0 additions and 2 deletions
|
|
@ -17,7 +17,6 @@ function App() {
|
||||||
const whiteLabel = getWhitelabel()
|
const whiteLabel = getWhitelabel()
|
||||||
const manifestPath = "/" + whiteLabel.name.replace(/\s/g, "") + "/manifest.json"
|
const manifestPath = "/" + whiteLabel.name.replace(/\s/g, "") + "/manifest.json"
|
||||||
const manifestDocument = document.getElementById('manifest-link') as HTMLLinkElement
|
const manifestDocument = document.getElementById('manifest-link') as HTMLLinkElement
|
||||||
console.log(manifestPath)
|
|
||||||
fetch(manifestPath).then(response => {
|
fetch(manifestPath).then(response => {
|
||||||
if (response.ok && manifestDocument) {
|
if (response.ok && manifestDocument) {
|
||||||
manifestDocument.href = manifestPath;
|
manifestDocument.href = manifestPath;
|
||||||
|
|
@ -32,7 +31,6 @@ function App() {
|
||||||
const faviconDocument = document.getElementById("favicon-link") as HTMLLinkElement;
|
const faviconDocument = document.getElementById("favicon-link") as HTMLLinkElement;
|
||||||
const faviconPath = `/${whiteLabel.name.replace(/\s/g, "")}/favicon.ico`;
|
const faviconPath = `/${whiteLabel.name.replace(/\s/g, "")}/favicon.ico`;
|
||||||
fetch(faviconPath).then(response => {
|
fetch(faviconPath).then(response => {
|
||||||
console.log("response ok: " + response.ok)
|
|
||||||
if (response.ok && faviconDocument) {
|
if (response.ok && faviconDocument) {
|
||||||
faviconDocument.href = faviconPath;
|
faviconDocument.href = faviconPath;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue