We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 302ec04 commit 093107bCopy full SHA for 093107b
src/core/index.ts
@@ -192,12 +192,14 @@ export const start = () => {
192
}
193
194
if (render.name) {
195
- const prev = ReactScanInternals.reportData[render.name];
196
- prev.renders.push(render);
+ const report = ReactScanInternals.reportData[render.name];
+ if (report) {
197
+ report.renders.push(render);
198
+ }
199
ReactScanInternals.reportData[render.name] = {
- count: (prev?.count ?? 0) + render.count,
- time: (prev?.time ?? 0) + render.time,
200
- renders: prev.renders,
+ count: (report?.count ?? 0) + render.count,
201
+ time: (report?.time ?? 0) + render.time,
202
+ renders: report?.renders || [],
203
};
204
205
0 commit comments