From: daiwei Date: Fri, 18 Apr 2025 02:08:52 +0000 (+0800) Subject: chore: avoid using process as function name X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f84427bc81c655821455da0ad98d0c3444dd0e49;p=thirdparty%2Fvuejs%2Fcore.git chore: avoid using process as function name --- diff --git a/packages/runtime-vapor/src/components/KeepAlive.ts b/packages/runtime-vapor/src/components/KeepAlive.ts index 0674cd5a8e..b785f38456 100644 --- a/packages/runtime-vapor/src/components/KeepAlive.ts +++ b/packages/runtime-vapor/src/components/KeepAlive.ts @@ -66,9 +66,9 @@ export const VaporKeepAliveImpl: ObjectVaporComponent = defineVaporComponent({ const storageContainer = createElement('div') let current: VaporComponentInstance | VaporFragment | undefined - // if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { - // ;(keepAliveInstance as any).__v_cache = cache - // } + if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { + ;(keepAliveInstance as any).__v_cache = cache + } function shouldCache(instance: VaporComponentInstance) { const { include, exclude } = props @@ -136,7 +136,7 @@ export const VaporKeepAliveImpl: ObjectVaporComponent = defineVaporComponent({ keepAliveInstance.getStorageContainer = () => storageContainer keepAliveInstance.getCachedComponent = comp => cache.get(comp) - const process = (keepAliveInstance.process = block => { + const processShapeFlag = (keepAliveInstance.process = block => { const instance = getInnerComponent(block) if (!instance) return @@ -170,7 +170,7 @@ export const VaporKeepAliveImpl: ObjectVaporComponent = defineVaporComponent({ // (when using `v-if` or ``). For `DynamicFragment` children, // the `shapeFlag` is processed in `DynamicFragment.update`. Here only need // to process the `VaporComponentInstance` - if (isVaporComponent(children)) process(children) + if (isVaporComponent(children)) processShapeFlag(children) function pruneCache(filter: (name: string) => boolean) { cache.forEach((instance, key) => {