Skip to content

Commit

Permalink
refactor(lucid): replace Object.entries with _.each
Browse files Browse the repository at this point in the history
  • Loading branch information
Radoslaw Mejer committed Jan 5, 2018
1 parent 75939ad commit 3676b2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Lucid/EagerLoad/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ class EagerLoad {
* @private
*/
_chainNested ({ relatedQuery }, nested) {
Object.entries(nested || {})
.forEach(([name, callback]) => {
relatedQuery.with(name, callback)
})
_.each(nested || {}, (callback, name) => {
relatedQuery.with(name, callback)
})
}

/**
Expand Down

0 comments on commit 3676b2e

Please sign in to comment.