Skip to content

Commit eee10ec

Browse files
committed
perf: use startsWith on key
1 parent c5c8174 commit eee10ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/OnyxUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ function isCollectionKey(key: OnyxKey): key is CollectionKeyBase {
395395
}
396396

397397
function isCollectionMemberKey<TCollectionKey extends CollectionKeyBase>(collectionKey: TCollectionKey, key: string, collectionKeyLength: number): key is `${TCollectionKey}${string}` {
398-
return Str.startsWith(key, collectionKey) && key.length > collectionKeyLength;
398+
return key.startsWith(collectionKey) && key.length > collectionKeyLength;
399399
}
400400

401401
/**

0 commit comments

Comments
 (0)