Use document.title as default title

This commit is contained in:
Hongbo Wu
2023-01-30 15:56:33 +08:00
parent 341f88c4d6
commit c5519ca894

View File

@ -6,7 +6,7 @@
function getDocumentTitle () {
const opengraphTitleEl = document.querySelector(SELECTORS.TITLE);
const openGraphTitle = opengraphTitleEl && opengraphTitleEl.content;
return openGraphTitle || document.title || '';
return document.title || openGraphTitle || '';
}
function getCanonicalUrl () {