diff --git a/lib/Onyx.js b/lib/Onyx.js index 3486c20f3..381b4f286 100644 --- a/lib/Onyx.js +++ b/lib/Onyx.js @@ -1134,6 +1134,11 @@ function mergeCollection(collectionKey, collection) { if (isKeyMatch(collectionKey, dataKey)) { return; } + + if (process.env.NODE_ENV === 'development') { + throw new Error(`Provided collection doesn't have all its data belonging to the same parent. CollectionKey: ${collectionKey}, DataKey: ${dataKey}`); + } + hasCollectionKeyCheckFailed = true; Logger.logAlert(`Provided collection doesn't have all its data belonging to the same parent. CollectionKey: ${collectionKey}, DataKey: ${dataKey}`); });