diff --git a/packages/reactivity/src/computed.ts b/packages/reactivity/src/computed.ts index 70670d81ec2..ad518f3c5e6 100644 --- a/packages/reactivity/src/computed.ts +++ b/packages/reactivity/src/computed.ts @@ -119,12 +119,6 @@ export class ComputedRefImpl implements Dependency, Subscriber { // dev only onTrigger?: (event: DebuggerEvent) => void - /** - * Dev only - * @internal - */ - _warnRecursive?: boolean - constructor( public fn: ComputedGetter, private readonly setter: ComputedSetter | undefined, diff --git a/packages/runtime-core/src/apiComputed.ts b/packages/runtime-core/src/apiComputed.ts index 2ebb2d4e63a..39ec10a15f4 100644 --- a/packages/runtime-core/src/apiComputed.ts +++ b/packages/runtime-core/src/apiComputed.ts @@ -1,17 +1,10 @@ -import { type ComputedRefImpl, computed as _computed } from '@vue/reactivity' -import { getCurrentInstance, isInSSRComponentSetup } from './component' +import { computed as _computed } from '@vue/reactivity' +import { isInSSRComponentSetup } from './component' export const computed: typeof _computed = ( getterOrOptions: any, debugOptions?: any, ) => { // @ts-expect-error - const c = _computed(getterOrOptions, debugOptions, isInSSRComponentSetup) - if (__DEV__) { - const i = getCurrentInstance() - if (i && i.appContext.config.warnRecursiveComputed) { - ;(c as unknown as ComputedRefImpl)._warnRecursive = true - } - } - return c as any + return _computed(getterOrOptions, debugOptions, isInSSRComponentSetup) as any } diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index 748de866f75..08a6dda2a5f 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -149,12 +149,6 @@ export interface AppConfig { */ isCustomElement?: (tag: string) => boolean - /** - * TODO document for 3.5 - * Enable warnings for computed getters that recursively trigger itself. - */ - warnRecursiveComputed?: boolean - /** * Whether to throw unhandled errors in production. * Default is `false` to avoid crashing on any error (and only logs it)