fix(certidao): corrigir reinicialização do documento com base na autenticação do usuário
All checks were successful
Dev Build & Deploy Portal / build-deploy (push) Successful in 2m35s

This commit is contained in:
Gabriel Bezerra 2026-05-20 12:51:09 -03:00
parent ccc428f7b5
commit 0c9930d8f7
2 changed files with 3 additions and 2 deletions

View File

@ -68,7 +68,8 @@ const acesRapidos = [
] ]
function formatarMoeda(valor) { function formatarMoeda(valor) {
return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(valor ?? 0) const n = Number(valor ?? 0)
return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(Number.isNaN(n) ? 0 : n)
} }
const iconeAtividade = { const iconeAtividade = {

View File

@ -66,7 +66,7 @@ async function emitir() {
} }
function reiniciar() { function reiniciar() {
documento.value = '' documento.value = isAuthenticated.value ? docUsuarioLogado.value : ''
resultado.value = null resultado.value = null
mensagemErro.value = '' mensagemErro.value = ''
etapa.value = 'formulario' etapa.value = 'formulario'