mirror of https://github.com/webpack/webpack.git
fix array expansion when using "..."
This commit is contained in:
parent
5ff9a1486f
commit
e63e733713
|
@ -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()));
|
||||
|
|
Loading…
Reference in New Issue