Skip to content

Commit 0ae4b24

Browse files
committed
refactor(packages/sui-react-web-vitals): improve the target validation
1 parent fb9e8c0 commit 0ae4b24

File tree

1 file changed

+1
-1
lines changed
  • packages/sui-react-web-vitals/src

1 file changed

+1
-1
lines changed

packages/sui-react-web-vitals/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default function WebVitalsReporter({
102102
const isAllowed = allowed.includes(pathname) || allowed.includes(routeid)
103103
const target = getTarget({name, attribution})
104104

105-
if (!isAllowed || !logger?.cwv || rating === RATING.GOOD || target === '' || target === null) return
105+
if (!isAllowed || !logger?.cwv || rating === RATING.GOOD || !target) return
106106

107107
const {loadState, eventType} = attribution
108108

0 commit comments

Comments
 (0)