From 5262c3848e3cd879f16e6878dfd463babbdbb3b1 Mon Sep 17 00:00:00 2001 From: Justineo Date: Sun, 12 Oct 2025 00:19:32 +0800 Subject: [PATCH] fix: remove unnecessary condition --- src/composables/slot.ts | 2 +- vitest.config.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/composables/slot.ts b/src/composables/slot.ts index eb40057..e8a169d 100644 --- a/src/composables/slot.ts +++ b/src/composables/slot.ts @@ -121,7 +121,7 @@ export function useSlotOption(slots: Slots, onSlotsChange: () => void) { // Traverse to the parent of the leaf, cloning or creating along the way let cur: Record | undefined = root; for (let i = 0; i < path.length - 1; i++) { - cur = cur && ensureChild(cur, path[i]); + cur = ensureChild(cur, path[i]); if (!cur) { return; // Blocked by a primitive — skip this key } diff --git a/vitest.config.ts b/vitest.config.ts index ec13a82..1c362d5 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -13,6 +13,7 @@ export default mergeConfig( provider: "v8", reporter: ["text", "lcov", "html"], include: ["src/**/*.{ts,tsx,js,jsx,vue}"], + exclude: ["src/types.ts"], reportsDirectory: "coverage/browser", }, browser: {