You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since upgrading to Vue 3 is not currently a viable option, I perform a small hack to make my class (which is a subclass of Array) reactive while maintaining its identity. This, however, results in an error when I try to call sort on it.
A simple fix could be checking if ob is defined before attempting to access any of its members.
I can understand why this would be considered a duplicate of #9259, but the solution differs in extremity. I'm not asking to rewrite Vue 2. A simple if statement would overcome my issue.
Version
2.6.11
Reproduction link
https://jsfiddle.net/cdzos023/
Steps to reproduce
See fiddle.
Since upgrading to Vue 3 is not currently a viable option, I perform a small hack to make my class (which is a subclass of Array) reactive while maintaining its identity. This, however, results in an error when I try to call
sort
on it.A simple fix could be checking if
ob
is defined before attempting to access any of its members.vue/src/core/observer/array.js
Line 40 in e7cf063
vue/src/core/observer/array.js
Line 42 in e7cf063
The text was updated successfully, but these errors were encountered: