vue
vue copied to clipboard
In notify, why is the return not checked when subs is empty
Version
2.7.14
Reproduction link
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
When subs is an empty array, neither the for loop nor the sort will execute, so there is no need to check.