Merge branch 'precheck-title' into 'develop'

Precheck: don't take <title> into consideration

See merge request soapbox-pub/soapbox-fe!1520
chats-fixes
Alex Gleason 2022-06-10 18:56:39 +00:00
commit ccd22e70ba
1 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -3,9 +3,6 @@
* @module soapbox/precheck * @module soapbox/precheck
*/ */
/** Whether a page title was inserted with SSR. */
const hasTitle = Boolean(document.querySelector('title'));
/** Whether pre-rendered data exists in Mastodon's format. */ /** Whether pre-rendered data exists in Mastodon's format. */
const hasPrerenderPleroma = Boolean(document.getElementById('initial-results')); const hasPrerenderPleroma = Boolean(document.getElementById('initial-results'));
@ -13,4 +10,4 @@ const hasPrerenderPleroma = Boolean(document.getElementById('initial-results'))
const hasPrerenderMastodon = Boolean(document.getElementById('initial-state')); const hasPrerenderMastodon = Boolean(document.getElementById('initial-state'));
/** Whether initial data was loaded into the page by server-side-rendering (SSR). */ /** Whether initial data was loaded into the page by server-side-rendering (SSR). */
export const isPrerendered = hasTitle || hasPrerenderPleroma || hasPrerenderMastodon; export const isPrerendered = hasPrerenderPleroma || hasPrerenderMastodon;