Skip to content

Commit 588bcf7

Browse files
smallnine9yyx990803
authored andcommitted
fix(runtime-core): Infinite Loop Detection should throw a real error (close vuejs#7437)
1 parent 317b783 commit 588bcf7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/runtime-core/src/scheduler.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ErrorCodes, callWithErrorHandling } from './errorHandling'
22
import { Awaited, isArray, NOOP } from '@vue/shared'
33
import { ComponentInternalInstance, getComponentName } from './component'
4-
import { warn } from './warning'
54

65
export interface SchedulerJob extends Function {
76
id?: number
@@ -271,7 +270,7 @@ function checkRecursiveUpdates(seen: CountMap, fn: SchedulerJob) {
271270
if (count > RECURSION_LIMIT) {
272271
const instance = fn.ownerInstance
273272
const componentName = instance && getComponentName(instance.type)
274-
warn(
273+
throw new Error(
275274
`Maximum recursive updates exceeded${
276275
componentName ? ` in component <${componentName}>` : ``
277276
}. ` +

0 commit comments

Comments
 (0)