Skip to content

Commit

Permalink
fix array expansion when using "..."
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Mar 8, 2021
1 parent 5ff9a14 commit e63e733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config/defaults.js
Expand Up @@ -95,7 +95,7 @@ const A = (obj, prop, factory) => {
const item = value[i];
if (item === "...") {
if (newArray === undefined) {
newArray = i > 0 ? value.slice(0, i - 1) : [];
newArray = value.slice(0, i);
obj[prop] = /** @type {T[P]} */ (/** @type {unknown} */ (newArray));
}
const items = /** @type {any[]} */ (/** @type {unknown} */ (factory()));
Expand Down

0 comments on commit e63e733

Please sign in to comment.