diff --git a/package.json b/package.json index 6bf958c..5339ca2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nostr-one", "description": "The last button you will ever need to login with Nostr", "private": false, - "version": "0.0.2", + "version": "0.0.3", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", diff --git a/src/components/nostr-one.ce.vue b/src/components/nostr-one.ce.vue index 0e4bcb0..16780d0 100644 --- a/src/components/nostr-one.ce.vue +++ b/src/components/nostr-one.ce.vue @@ -24,9 +24,13 @@ declare global { } onMounted(() => { - if (window.nostr) { - nip07Enabled.value = true; - } + // Hack: window.nostr is not always available on mount + const timeout = setTimeout(() => { + if (window.nostr) { + nip07Enabled.value = true; + } + clearTimeout(timeout); + }, 100); }); const nip07Enabled = ref(false);