Skip to content

Commit

Permalink
[Perf] improve performance by optimizing getId
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot committed Oct 6, 2022
1 parent d0da6bf commit c8af752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/Components.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const isFirstLetterCapitalized = require('./isFirstLetterCapitalized');
const isDestructuredFromPragmaImport = require('./isDestructuredFromPragmaImport');

function getId(node) {
return node && node.range.join(':');
return node ? `${node.range[0]}:${node.range[1]}` : '';
}

function usedPropTypesAreEquivalent(propA, propB) {
Expand Down

0 comments on commit c8af752

Please sign in to comment.