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) {
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 = {

View File

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