Fix missing document title on the search page (#1578)

This commit is contained in:
toasted-nutbread 2021-03-31 19:58:33 -04:00 committed by GitHub
parent f4af3f31ef
commit da612bbdd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1347,7 +1347,7 @@ class Display extends EventDispatcher {
const {state} = this._history; const {state} = this._history;
let {documentTitle, url, sentence} = (isObject(state) ? state : {}); let {documentTitle, url, sentence} = (isObject(state) ? state : {});
if (typeof documentTitle !== 'string') { if (typeof documentTitle !== 'string') {
documentTitle = ''; documentTitle = document.title;
} }
if (typeof url !== 'string') { if (typeof url !== 'string') {
url = window.location.href; url = window.location.href;