aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/app.js b/app.js
index 7371102..c15f2f2 100644
--- a/app.js
+++ b/app.js
@@ -23,19 +23,20 @@ function route (keys) {
input,
h('button', {
onclick: function () {
- content = {
- type: 'name',
- named: id,
- name: input.value
- }
- console.log('GETTING NAME')
- publish(content, keys)
- setTimeout(function () {
- getName(id, keys)
+ if (input.value) {
+ content = {
+ type: 'name',
+ named: id,
+ name: input.value
+ }
+ publish(content, keys)
setTimeout(function () {
- location.reload()
+ getName(id, keys)
+ setTimeout(function () {
+ location.reload()
+ }, 1000)
}, 1000)
- }, 1000)
+ }
}
}, ['Identify'])
]))