### Version 2.7.14 ### Reproduction link [github.com](https://github.com/vuejs/vue/blob/main/src/core/observer/dep.ts) ### Steps to reproduce There is no ### What is expected? const subs = this.subs.filter(s => s) as DepTarget[] if (subs.length === 0) return ### What is actually happening? subs Keep running down <!-- generated by vue-issues. DO NOT REMOVE -->
Activity
Alfred-Skyblue commentedon Jun 12, 2023
When subs is an empty array, neither the for loop nor the sort will execute, so there is no need to check.