Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Onyx.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ function mergeCollection(collectionKey, collection) {
function update(data) {
// First, validate the Onyx object is in the format we expect
_.each(data, ({onyxMethod, key}) => {
if (!_.contains(['clear', 'set', 'merge', 'mergeCollection'], onyxMethod)) {
if (!_.contains(['clear', 'set', 'merge', 'mergecollection'], onyxMethod)) {
throw new Error(`Invalid onyxMethod ${onyxMethod} in Onyx update.`);
}
if (onyxMethod !== 'clear' && !_.isString(key)) {
Expand All @@ -833,7 +833,7 @@ function update(data) {
case 'merge':
merge(key, value);
break;
case 'mergeCollection':
case 'mergecollection':
mergeCollection(key, value);
break;
case 'clear':
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/onyxTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ describe('Onyx', () => {
// WHEN we pass a mergeCollection data object to Onyx.update
Onyx.update([
{
onyxMethod: 'mergeCollection',
onyxMethod: 'mergecollection',
key: ONYX_KEYS.COLLECTION.TEST_KEY,
value: {
test_1: {
Expand Down