Vue: Maximum call stack size exceeded in v-bind:class using $slots

Created on 10 Mar 2018  ·  5Comments  ·  Source: vuejs/vue

Version

2.5.14

Reproduction link

https://jsfiddle.net/mmx38qxw/568/

Steps to reproduce

Run the fiddle

What is expected?

Render without error

What is actually happening?

Console warns that maximum call stack size exceeded


This demo works fine in prior versions, so it might be a regression in 2.5.14. Another find is that if I don't pass <span slot="append"> to <compo>, there'll be no error.

regression

Most helpful comment

@yyx990803 Will there be a hotfix?
upd: released https://github.com/vuejs/vue/releases/tag/v2.5.15

All 5 comments

一不小心升级了下,同时升级了ele-ui。看到这个我就放心了

It was introduced in https://github.com/vuejs/vue/commit/956756b1be7084daf8b6afb92ac0da7c24cde2a5, as a workround, you can use something like:

{
  template: `
    <div :class="{ 'has-slot': !!$slots.append }">
      <slot name="append"></slot>
    </div>
  `
}

@yyx990803 Will there be a hotfix?
upd: released https://github.com/vuejs/vue/releases/tag/v2.5.15

修复速度真快,666~

Case failed with this error when:

  • exists computed array with other reactive components
  • set watcher { deep: true } on it computed
Was this page helpful?
0 / 5 - 0 ratings