Skip to content

Commit

Permalink
fix(ui): cast subscribedAt/followedAt to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Dec 27, 2020
1 parent 870c5d8 commit 568ccde
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/panel/views/managers/viewers.vue
Expand Up @@ -728,7 +728,7 @@ export default defineComponent({
const currentPage = ref(1);
const perPage = ref(25);
const historyCurrentPage = ref(0);
const historyCurrentPage = ref(1);
const historyPerPage = ref(10);
const sortDesc = ref(false);
Expand Down Expand Up @@ -806,6 +806,16 @@ export default defineComponent({
if (val !== null && oldVal !== null) {
state.value.pending = true;
}
if (val) {
const locale = get(ctx.root.$store.state, 'configuration.lang', 'en');
if (typeof val.subscribedAt === 'string' && editationItem.value) {
editationItem.value.subscribedAt = dayjs(val.subscribedAt, 'LLL', locale).unix() * 1000;
}
if (typeof val.followedAt === 'string' && editationItem.value) {
editationItem.value.followedAt = dayjs(val.followedAt, 'LLL', locale).unix() * 1000;
}
}
}, { deep: true });
watch(editationItemWatchedTime, (val: number) => {
Expand Down

0 comments on commit 568ccde

Please sign in to comment.