computed: {
//TODO: vue ругается на sort
sortedArray() {
return this.tasks.sort((a, b) => a.completed - b.completed )
}
},
[Vue warn]: Error in render: "TypeError: this.tasks.sort is not a function"
if (!this.tasks) return [];
return this.tasks.sort((a, b) => a.completed - b.completed)