Vue: scoped slots infinite update loop when binded to same data more than once

Created on 18 Jul 2017  Â·  3Comments  Â·  Source: vuejs/vue

Version

2.4.1

Reproduction link

https://jsfiddle.net/38d0jj83/2/

Steps to reproduce

Open console and run.

What is expected?

There will not be an infinite loop

What is actually happening?

Second sort-page-control generates infinite update loop:

Console: [Vue warn]: You may have an infinite update loop in a component render function.

found in

--->


As I understand, list getter in sort-page-control produces additional watchers or something like this.
v2.3.3 have problem too

Most helpful comment

Array.prototype.sort is a mutating method. Copy the array before calling it.

All 3 comments

Array.prototype.sort is a mutating method. Copy the array before calling it.

@yyx990803 You broke my world. Couple of years I was sure that it is not mutating method :O And I'm not alone! :O

I faced the same problem ... Your are not alone( ̄∇ ̄).

Was this page helpful?
0 / 5 - 0 ratings