Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
dd338da7
Unverified
Commit
dd338da7
authored
4 years ago
by
Michaël De Boey
Browse files
Options
Download
Email Patches
Plain Diff
Update reportWebVitals.ts
parent
a97c5d1d
github/fork/MichaelDeBoey/patch-1
1 merge request
!10377
Remove onPerfEntry is a Function check
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/cra-template-typescript/template/src/reportWebVitals.ts
+1
-1
...s/cra-template-typescript/template/src/reportWebVitals.ts
with
1 addition
and
1 deletion
+1
-1
packages/cra-template-typescript/template/src/reportWebVitals.ts
+
1
-
1
View file @
dd338da7
import
{
ReportHandler
}
from
'
web-vitals
'
;
const
reportWebVitals
=
(
onPerfEntry
?:
ReportHandler
)
=>
{
if
(
onPerfEntry
&&
onPerfEntry
instanceof
Function
)
{
if
(
onPerfEntry
)
{
import
(
'
web-vitals
'
).
then
(({
getCLS
,
getFID
,
getFCP
,
getLCP
,
getTTFB
})
=>
{
getCLS
(
onPerfEntry
);
getFID
(
onPerfEntry
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets