MCPcopy
hub / github.com/vuejs/core / checkRecursiveUpdates

Function checkRecursiveUpdates

packages/runtime-core/src/scheduler.ts:270–290  ·  view source on GitHub ↗
(seen: CountMap, fn: SchedulerJob)

Source from the content-addressed store, hash-verified

268}
269
270function checkRecursiveUpdates(seen: CountMap, fn: SchedulerJob) {
271 const count = seen.get(fn) || 0
272 if (count > RECURSION_LIMIT) {
273 const instance = fn.i
274 const componentName = instance && getComponentName(instance.type)
275 handleError(
276 `Maximum recursive updates exceeded${
277 componentName ? ` in component <${componentName}>` : ``
278 }. ` +
279 `This means you have a reactive effect that is mutating its own ` +
280 `dependencies and thus recursively triggering itself. Possible sources ` +
281 `include component template, render function, updated hook or ` +
282 `watcher source function.`,
283 null,
284 ErrorCodes.APP_ERROR_HANDLER,
285 )
286 return true
287 }
288 seen.set(fn, count + 1)
289 return false
290}

Callers 3

flushPreFlushCbsFunction · 0.85
flushPostFlushCbsFunction · 0.85
flushJobsFunction · 0.85

Calls 4

getComponentNameFunction · 0.90
handleErrorFunction · 0.90
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected