From ad5654952a69769ed753ff76de7aa58a33303fdd Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 9 Mar 2021 22:32:34 -0500 Subject: [PATCH] fix: #9362 --- src/meta/tags.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/meta/tags.js b/src/meta/tags.js index b719ad49f4..421982c4f4 100644 --- a/src/meta/tags.js +++ b/src/meta/tags.js @@ -6,6 +6,7 @@ const winston = require('winston'); const plugins = require('../plugins'); const Meta = require('./index'); const utils = require('../utils'); +const file = require('./src/file'); const Tags = module.exports; @@ -55,11 +56,14 @@ Tags.parse = async (req, data, meta, link) => { }); } + const uploadedFaviconPath = `${relative_path}/assets/uploads/system/favicon.ico`; + const faviconPath = await file.exists(uploadedFaviconPath) ? uploadedFaviconPath : `${relative_path}/favicon.ico`; + // Link Tags const defaultLinks = [{ rel: 'icon', type: 'image/x-icon', - href: `${relative_path}/favicon.ico${Meta.config['cache-buster'] ? `?${Meta.config['cache-buster']}` : ''}`, + href: `${faviconPath}${Meta.config['cache-buster'] ? `?${Meta.config['cache-buster']}` : ''}`, }, { rel: 'manifest', href: `${relative_path}/manifest.webmanifest`,