Skip to content

Commit 8681c12

Browse files
committed
chore: rename method to make it more explicit it is dev only
1 parent 3a75d5d commit 8681c12

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/runtime-core/src/component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import {
1313
ComponentPublicInstance,
1414
PublicInstanceProxyHandlers,
15-
createRenderContext,
15+
createDevRenderContext,
1616
exposePropsOnRenderContext,
1717
exposeSetupStateOnRenderContext,
1818
ComponentPublicInstanceConstructor,
@@ -521,7 +521,7 @@ export function createComponentInstance(
521521
sp: null
522522
}
523523
if (__DEV__) {
524-
instance.ctx = createRenderContext(instance)
524+
instance.ctx = createDevRenderContext(instance)
525525
} else {
526526
instance.ctx = { _: instance }
527527
}

packages/runtime-core/src/componentPublicInstance.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,11 @@ export const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend(
484484
}
485485
)
486486

487+
// dev only
487488
// In dev mode, the proxy target exposes the same properties as seen on `this`
488489
// for easier console inspection. In prod mode it will be an empty object so
489490
// these properties definitions can be skipped.
490-
export function createRenderContext(instance: ComponentInternalInstance) {
491+
export function createDevRenderContext(instance: ComponentInternalInstance) {
491492
const target: Record<string, any> = {}
492493

493494
// expose internal instance for proxy handlers

0 commit comments

Comments
 (0)