sforkowany z mirror/soapbox
Merge branch 'precheck-title' into 'develop'
Precheck: don't take <title> into consideration See merge request soapbox-pub/soapbox-fe!1520chats-fixes
commit
ccd22e70ba
|
@ -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;
|
||||||
|
|
Ładowanie…
Reference in New Issue