From eee10ec9816a43aa342b2cead8ca4a9adb2f3424 Mon Sep 17 00:00:00 2001 From: hurali97 Date: Tue, 6 Aug 2024 13:09:30 +0500 Subject: [PATCH] perf: use startsWith on key --- lib/OnyxUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OnyxUtils.ts b/lib/OnyxUtils.ts index 5f22b964..a5055cd1 100644 --- a/lib/OnyxUtils.ts +++ b/lib/OnyxUtils.ts @@ -395,7 +395,7 @@ function isCollectionKey(key: OnyxKey): key is CollectionKeyBase { } function isCollectionMemberKey(collectionKey: TCollectionKey, key: string, collectionKeyLength: number): key is `${TCollectionKey}${string}` { - return Str.startsWith(key, collectionKey) && key.length > collectionKeyLength; + return key.startsWith(collectionKey) && key.length > collectionKeyLength; } /**