From 0d7fbc83139434fb7e00c3755121a036402c7185 Mon Sep 17 00:00:00 2001 From: robert Date: Tue, 14 Feb 2023 09:40:52 +0100 Subject: [PATCH] refs #4869 no borrar pin al abrit dialogo --- js/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/index.js b/js/index.js index c4c5d3e..33e51f9 100644 --- a/js/index.js +++ b/js/index.js @@ -10,6 +10,8 @@ function setEvents() { const heartEl = document.querySelector('body > h1 > span'); heartEl.addEventListener('click', function() { const key = prompt('Introduce la clave'); + console.log('key', key) + if (key === null) return localStorage.setItem('vnKey', key); });