Skip to content

Commit

Permalink
fix: #9362
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny committed Mar 10, 2021
1 parent 678e8f0 commit ad56549
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/meta/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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`,
Expand Down

0 comments on commit ad56549

Please sign in to comment.