diff --git a/lib/config-loader.js b/lib/config-loader.js index 1d654e1..50fb605 100644 --- a/lib/config-loader.js +++ b/lib/config-loader.js @@ -2,7 +2,7 @@ var fs = require('fs'); var path = require('path'); var debug = require('debug')('loopback:boot:config-loader'); var assert = require('assert'); -var _ = require('lodash'); +var lodash = require('lodash'); var ConfigLoader = exports; /** @@ -290,9 +290,11 @@ function mergeArrays(target, config, keyPrefix) { } function mergeArraysDiffLength(target, config) { - var newTarget = _.cloneDeep(target, true); - //modifies the target array with the union of both the target and config arrays. - Array.prototype.splice.apply(target, [0, target.length].concat(_.union(newTarget, config))); + var newTarget = lodash.cloneDeep(target, true); + //union of both the target and config arrays. + var union = lodash.union(newTarget, config); + //modifies the target array with the union. + Array.prototype.splice.apply(target, [0, target.length].concat(union)); } function hasCompatibleType(origValue, newValue) {