diff options
Diffstat (limited to 'tools/eslint/node_modules/lodash/concat.js')
-rw-r--r-- | tools/eslint/node_modules/lodash/concat.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/eslint/node_modules/lodash/concat.js b/tools/eslint/node_modules/lodash/concat.js index 506306c653..1da48a4fc7 100644 --- a/tools/eslint/node_modules/lodash/concat.js +++ b/tools/eslint/node_modules/lodash/concat.js @@ -26,17 +26,18 @@ var arrayPush = require('./_arrayPush'), * // => [1] */ function concat() { - var length = arguments.length, - args = Array(length ? length - 1 : 0), + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), array = arguments[0], index = length; while (index--) { args[index - 1] = arguments[index]; } - return length - ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)) - : []; + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } module.exports = concat; |