Skip to content

Commit f98f4ee

Browse files
committed
fix: don't cast to string
1 parent f925bb8 commit f98f4ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/src/profiler.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const getInitActivity = (name: string, shouldCancel = false): number | null => {
8888
if (isReactInDevMode()) {
8989
// We can make the guarantee here that if a redundant activity exists, it comes right
9090
// before the current activity, hence having a profilerCount one less than the existing count.
91-
const redundantActivity = profiledComponents[String(`${name}${profilerCount - 1}`)];
91+
const redundantActivity = profiledComponents[`${name}${profilerCount - 1}`];
9292

9393
if (redundantActivity) {
9494
// tslint:disable: no-unsafe-any
@@ -102,7 +102,7 @@ const getInitActivity = (name: string, shouldCancel = false): number | null => {
102102
// If an redundant activity didn't exist, we can store the current activity to
103103
// check later. We have to do this inside an else block because of the case of
104104
// the edge case where two components may share a single components name.
105-
profiledComponents[String(`${name}${profilerCount}`)] = activity;
105+
profiledComponents[`${name}${profilerCount}`] = activity;
106106
}
107107
}
108108

0 commit comments

Comments
 (0)