From 67e511d719cbc3e7f2b391a8d6914406caa2fb24 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 23 Aug 2021 16:51:49 -0300
Subject: updated build fast for web

---
 packages/taler-wallet-webextension/src/components/EditableText.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/components/EditableText.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/EditableText.tsx b/packages/taler-wallet-webextension/src/components/EditableText.tsx
index 82983d13a..6f3388bf9 100644
--- a/packages/taler-wallet-webextension/src/components/EditableText.tsx
+++ b/packages/taler-wallet-webextension/src/components/EditableText.tsx
@@ -14,7 +14,7 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
-import { VNode } from "preact";
+import { h } from "preact";
 import { useRef, useState } from "preact/hooks";
 import { JSX } from "preact/jsx-runtime";
 
@@ -27,7 +27,7 @@ interface Props {
 }
 export function EditableText({ name, value, onChange, label, description }: Props): JSX.Element {
   const [editing, setEditing] = useState(false)
-  const ref = useRef<HTMLInputElement>()
+  const ref = useRef<HTMLInputElement>(null)
   let InputText;
   if (!editing) {
     InputText = () => <div style={{ display: 'flex', justifyContent: 'space-between' }}>
@@ -42,7 +42,7 @@ export function EditableText({ name, value, onChange, label, description }: Prop
         type="text"
         id={`text-${name}`}
       />
-      <button onClick={() => { onChange(ref.current.value).then(r => setEditing(false)) }}>confirm</button>
+      <button onClick={() => { if (ref.current) onChange(ref.current.value).then(r => setEditing(false)) }}>confirm</button>
     </div>
   }
   return (
-- 
cgit v1.2.3

