Fix daily average on accounts younger than a day

このコミットが含まれているのは:
wakarimasen 2017-04-11 11:47:19 +02:00
コミット 66b59f2752
1個のファイルの変更2行の追加3行の削除

ファイルの表示

@ -79,9 +79,8 @@
return this.$store.state.users.currentUser
},
dailyAvg () {
return Math.round(
this.user.statuses_count / ((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))
)
const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))
return Math.round(this.user.statuses_count / days)
}
},
methods: {