(seen: CountMap, fn: SchedulerJob)
| 268 | } |
| 269 | |
| 270 | function 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 | } |
no test coverage detected