Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d60340

Browse files
committed
better conditionals
1 parent 3528671 commit 9d60340

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/views/multi-file-patch-view.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,8 @@ export default class MultiFilePatchView extends React.Component {
12041204
}
12051205

12061206
measurePerformance(action) {
1207-
if (action === 'update' || action === 'mount') {
1207+
if ((action === 'update' || action === 'mount')
1208+
&& performance.getEntriesByName(`MultiFilePatchView-${action}-start`).length > 0) {
12081209
performance.mark(`MultiFilePatchView-${action}-end`);
12091210
performance.measure(
12101211
`MultiFilePatchView-${action}`,

0 commit comments

Comments
 (0)