Skip to content

Commit

Permalink
Improve style
Browse files Browse the repository at this point in the history
  • Loading branch information
erikolson186 committed Jul 9, 2017
1 parent 4b9ab80 commit 678beb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ const $addToSet = (path_pieces, value) => (doc) => {
const elements = obj[field];
if (!Array.isArray(elements)) { return; }

for (let el of elements) {
if (equal(el, value)) { return; }
for (let element of elements) {
if (equal(element, value)) { return; }
}

elements.push(value);
Expand Down

0 comments on commit 678beb3

Please sign in to comment.