Skip to content

Commit a54799f

Browse files
committed
Shortcircuit the other way
1 parent 5145e21 commit a54799f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ namespace ts {
10561056
* - the caller should always be checking if the cache `.has` the member it would set.
10571057
*/
10581058
set(key: K, value: V): this {
1059-
if (!this.inner.has(key) && this.inner.size > ((2 ** 24) - 1)) {
1059+
if (this.inner.size > ((2 ** 24) - 1) && !this.inner.has(key)) {
10601060
this.next ||= new ExpandableRelationshipCache();
10611061
this.next.set(key, value);
10621062
}

0 commit comments

Comments
 (0)