From 655034972651d0d6bc5f063f1b1a84e1c0bf77f9 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Sun, 1 Dec 2024 18:12:34 +0800 Subject: [PATCH] fix(toArray): simplify impl (#858) --- src/compat/util/toArray.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/compat/util/toArray.ts b/src/compat/util/toArray.ts index 76c49f5d3..6c94b6fb7 100644 --- a/src/compat/util/toArray.ts +++ b/src/compat/util/toArray.ts @@ -23,10 +23,6 @@ export function toArray(value?: unknown): any[] { return Array.from(value); } - if (typeof value === 'string') { - return value.split(''); - } - if (typeof value === 'object') { return Object.values(value); }