Skip to content

Commit 3f3a59d

Browse files
committed
refactor: move development-only measurement and warning context handling back to createComponent from setupComponent
1 parent 3db1b2e commit 3f3a59d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/runtime-vapor/src/component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ export function createComponent(
332332
setupComponent(instance, component)
333333
}
334334

335+
if (__DEV__) {
336+
popWarningContext()
337+
endMeasure(instance, 'init')
338+
}
339+
335340
// restore currentSlotConsumer to previous value after setupFn is called
336341
setCurrentSlotConsumer(prevSlotConsumer)
337342
onScopeDispose(() => unmountComponent(instance), true)
@@ -431,11 +436,6 @@ export function setupComponent(
431436

432437
setActiveSub(prevSub)
433438
setCurrentInstance(...prevInstance)
434-
435-
if (__DEV__) {
436-
popWarningContext()
437-
endMeasure(instance, 'init')
438-
}
439439
}
440440

441441
export let isApplyingFallthroughProps = false

0 commit comments

Comments
 (0)