Skip to content

Commit 08939c9

Browse files
committed
Prettier diff
1 parent 97ae1fb commit 08939c9

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/OnyxUtils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,10 @@ function mergeCollectionWithPatches<TKey extends CollectionKeyBase>(
15791579
const cachedCollectionForExistingKeys = getCachedCollection(collectionKey, existingKeys);
15801580

15811581
const existingKeyCollection = existingKeys.reduce((obj: OnyxInputKeyValueMapping, key) => {
1582-
const {isCompatible, existingValueType, newValueType, isEmptyArrayCoercion} = utils.checkCompatibilityWithExistingValue(resultCollection[key], cachedCollectionForExistingKeys[key]);
1582+
const {isCompatible, existingValueType, newValueType, isEmptyArrayCoercion} = utils.checkCompatibilityWithExistingValue(
1583+
resultCollection[key],
1584+
cachedCollectionForExistingKeys[key],
1585+
);
15831586

15841587
if (isEmptyArrayCoercion) {
15851588
Logger.logAlert(`[ENSURE_BUGBOT] Onyx mergeCollection called on key "${key}" whose existing value is an empty array. Will coerce to object.`);

lib/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ function formatActionName(method: string, key?: OnyxKey): string {
207207
}
208208

209209
/** validate that the update and the existing value are compatible */
210-
function checkCompatibilityWithExistingValue(value: unknown, existingValue: unknown): {isCompatible: boolean; existingValueType?: string; newValueType?: string; isEmptyArrayCoercion?: boolean} {
210+
function checkCompatibilityWithExistingValue(
211+
value: unknown,
212+
existingValue: unknown,
213+
): {isCompatible: boolean; existingValueType?: string; newValueType?: string; isEmptyArrayCoercion?: boolean} {
211214
if (!existingValue || !value) {
212215
return {
213216
isCompatible: true,

0 commit comments

Comments
 (0)