Skip to content

Commit

Permalink
fix(runtime-core): Infinite Loop detection should throw a real error (c…
Browse files Browse the repository at this point in the history
…lose vuejs#7423)
  • Loading branch information
smallnine9 committed Jan 2, 2023
1 parent 1fa3d95 commit f5f1e38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/runtime-core/src/scheduler.ts
@@ -1,7 +1,6 @@
import { ErrorCodes, callWithErrorHandling } from './errorHandling'
import { isArray, NOOP } from '@vue/shared'
import { ComponentInternalInstance, getComponentName } from './component'
import { warn } from './warning'

export interface SchedulerJob extends Function {
id?: number
Expand Down Expand Up @@ -262,7 +261,7 @@ function checkRecursiveUpdates(seen: CountMap, fn: SchedulerJob) {
if (count > RECURSION_LIMIT) {
const instance = fn.ownerInstance
const componentName = instance && getComponentName(instance.type)
warn(
throw new Error(
`Maximum recursive updates exceeded${
componentName ? ` in component <${componentName}>` : ``
}. ` +
Expand Down

0 comments on commit f5f1e38

Please sign in to comment.