JiriChara / vue-kindergarten

Modular security for Vue, Vuex, Vue-Router and Nuxt
MIT License
312 stars 24 forks source link

Infinite update cycle bug fixed #32

Open v1996-96 opened 6 years ago

v1996-96 commented 6 years ago

Infinite update cycle bug used to appear when I log into system, navigated between few pages, logged out and login with another user. I am not able to show my code, but I can say that I did everything according to tutorial. As I think, the problem could be lying into the sandboxGetter. So infinite cycle occurred on the perimeter computed property in the component, that uses multiple perimeters at once. Therefore for each perimeter in that component the new sandbox has been initialized. Within that process there could be created some links between sanboxes instances or they could be mutating each other and that could be causing infinity update loop. So I have edited source code. Now the sandbox is being instantiated only once per component instantiation. That change fixed the problem I have had. But as I think, that change removed reactive link between sandbox and child getter (if there was one) :(

jayrchamp commented 4 years ago

@v1996-96 I have had the infinite loop problem and your change have saved me some debug time. Thank you