Infinite Loop when trigger ref getter then setter in AppConfig.errorHandler #9574
Labels
🍰 p2-nice-to-have
Priority 2: this is not breaking anything but nice to have it addressed.
🐞 bug
Something isn't working
Vue version
Commit 2c0414f (Latest at time of writing)
Link to minimal reproduction
https://play.vuejs.org/#eNp9UsFOIzEM/RUrF1qpSg/cWEDarZCWlRYQcMyBdMbtDGSSKHHKVKP5d5wMFBAIKYfE7/n52c4gfnsvdwnFiTiNVWg9QURK/lzZtvMuEAywRVqlENDSpY2kbYULCLiBETbBdXDE6Ue/lFW2coxDD2cZnv3X1Migbe262XxeCF+VZnOpvV85S9iTZIFNu5UYggt/OdNgYLHZHM7OYVAWoJc7bRKy2OHOhE+VGBtLseUS7ps2Ah9nzR5SxBrIQaX5BtpCKQN1Cq3dsmNbY74tSuZz01YN4I6tJm04e53Wa4MxCzx8Y/NBvrW/Z0M2GcMeTpfTSHmY/CDsvNGE/AIYBtjLNYxjZh0QsRAUX9Ufo7O8ldK2EpXrfMt1rj21XEaJk2kgGWN/7vlfiVFIyA1M8arB6umb+GPsc0yJm4ARww6VOGCkAy9pgi/urngpH8DO1ckw+wfwFqMzKXucaH9SGc8HXnF7Wf4WT/s+XvSENr41lY1m5lj4SvDfWv3Q+rvdY3lc8nj7YnwBhxb3iA==
Steps to reproduce
Upon opening the minimal reproduction link, the playground should immediately show the following error:
What is expected?
No error should occur.
What is actually happening?
It seems that triggering the ref's getter before the setter inside of
config.errorHandler
causes an infinite loop to occur.However, if the getter is placed after the setter, the no such infinite loop is entered.
System Info
No response
Any additional comments?
The ref can be a global ref (not instantiated inside of the component) and it seems like the bug still occurs. In the minimal reproduction playground, the ref is created inside
<script setup>
for simplicity.EDIT: Something else I forgot to add is that it seems the infinite loop is not entered when using
onErrorCaptured
, it only happens forconfig.errorHandler
.The text was updated successfully, but these errors were encountered: