diff --git a/src/modules/[chain]/block/[height].vue b/src/modules/[chain]/block/[height].vue index 3203f4d5..fac09e98 100644 --- a/src/modules/[chain]/block/[height].vue +++ b/src/modules/[chain]/block/[height].vue @@ -14,7 +14,7 @@ const props = defineProps(['height', 'chain']); const store = useBaseStore(); const format = useFormatter() const current = ref({} as Block) -const target =ref(Number(props.height||0)) +const target = ref(Number(props.height || 0)) const height = computed(() => { return Number(current.value.block?.header?.height || props.height || 0); @@ -23,8 +23,8 @@ const height = computed(() => { const isFutureBlock = computed({ get: () => { const latest = store.latest?.block?.header.height - const isFuture = latest ? target.value > Number(latest): true - if(!isFuture && !current.value.block_id) store.fetchBlock(target.value).then(x => current.value = x) + const isFuture = latest ? target.value > Number(latest) : true + if (!isFuture && !current.value.block_id) store.fetchBlock(target.value).then(x => current.value = x) return isFuture }, set: val => { @@ -63,36 +63,44 @@ onBeforeRouteUpdate(async (to, from, next) => { +