diff --git a/src/utils/collections/map.ts b/src/utils/collections/map.ts index 3f87d48..c8b2d43 100644 --- a/src/utils/collections/map.ts +++ b/src/utils/collections/map.ts @@ -330,7 +330,7 @@ export class MultiMap extends ArrayMap { * @returns This {@link MultiMap} instance for chaining purposes. */ set(key: K, value: V | Iterable): this { - const values = isIterable(value) ? asArray(value) : [value]; + const values = typeof value !== "string" && isIterable(value) ? asArray(value) : [value]; return super.set(key, values); } @@ -368,7 +368,7 @@ export class MultiMap extends ArrayMap { return this.set(key, value as V); } - if (isIterable(value)) { + if (typeof value !== "string" && isIterable(value)) { existingValues.push(...value); } else { existingValues.push(value);