diff --git a/src/index.ts b/src/index.ts index 33e8bc9..9772e61 100644 --- a/src/index.ts +++ b/src/index.ts @@ -157,9 +157,7 @@ export default class Config { switch (value) { case Array.isArray(value): - let newVal = this.array(key) ?? []; - newVal.push(value); - this.set(key, newVal); + this.set(key, [...(this.array(key) ?? []), ...value]); break; default: this.set(key, value);