From a633a97463c15d0e05de784964f3a0fb6153e35f Mon Sep 17 00:00:00 2001 From: bat Date: Wed, 1 Mar 2023 08:16:00 +0000 Subject: [PATCH] Actualizar 'components/project.js' --- components/project.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/project.js b/components/project.js index fa4a73c..47e0c12 100644 --- a/components/project.js +++ b/components/project.js @@ -3,13 +3,13 @@ export class Project extends HTMLElement { super() const shadow = this.attachShadow({mode: 'open'}) const textArea = document.createElement('textarea') - textArea.defaultValue = localStorage.getItem( + textArea.value = localStorage.getItem( window.location.hash - ) + ) ?? '' textArea.addEventListener('input', e => { localStorage.setItem( window.location.hash, - e.target.defaultValue + e.target.value ) }) shadow.appendChild(textArea)