Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit c97dee3

Browse files
committed
refactor(compiler-vapor): remove Object.entries
1 parent ca61022 commit c97dee3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/compiler-vapor/src/generators/component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ function genModelModifiers(
148148
}
149149

150150
function genSlots(slots: ComponentSlots, context: CodegenContext) {
151-
const slotList = Object.entries(slots)
151+
const names = Object.keys(slots)
152152
return genMulti(
153-
slotList.length > 1 ? DELIMITERS_OBJECT_NEWLINE : DELIMITERS_OBJECT,
154-
...slotList.map(([name, slot]) => [name, ': ', ...genBlock(slot, context)]),
153+
names.length > 1 ? DELIMITERS_OBJECT_NEWLINE : DELIMITERS_OBJECT,
154+
...names.map(name => [name, ': ', ...genBlock(slots[name], context)]),
155155
)
156156
}
157157

0 commit comments

Comments
 (0)