Skip to content

Commit

Permalink
fix: πŸ› Remove update and set from array to avoid confusion
Browse files Browse the repository at this point in the history
When a query with sorting/ordering/limiting is used to create a Firebase
Ref we can't update or set it, better to leave it to t

BREAKING CHANGE: he user to handle this.
  • Loading branch information
rakannimer committed Oct 10, 2018
1 parent ae00110 commit 82acded
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/to-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,10 @@ export function toArray<K, V>(
array.splice(childIndex, 1);
return;
});
const update = (value: any) => {
return ref.update(value);
};
const set = (value: any) => {
return ref.set(value);
};
const unsub = () => {
unsubChildAdded && unsubChildAdded();
unsubChildRemoved && unsubChildRemoved();
};

return { value: array, unsub, set, update };
return { value: array, unsub };
}

0 comments on commit 82acded

Please sign in to comment.