mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-16 16:25:56 +02:00
refactor(pwa): simplify registerSW code, fix ESLint errors (#7579)
This commit is contained in:
parent
bada5c11cc
commit
7869e74fd7
14 changed files with 204 additions and 247 deletions
|
@ -18,8 +18,8 @@ function logPage(
|
|||
prevLocation: previousLocation,
|
||||
heading: document.getElementsByTagName('h1')[0]?.innerText,
|
||||
title: document.title,
|
||||
description: (
|
||||
document.querySelector('meta[name="description"]') as HTMLMetaElement
|
||||
description: document.querySelector<HTMLMetaElement>(
|
||||
'meta[name="description"]',
|
||||
)?.content,
|
||||
htmlClassName: document.getElementsByTagName('html')[0]?.className,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue