diff --git a/views/index/logged_in.moon b/views/index/logged_in.moon index 31cc043..f5abf67 100644 --- a/views/index/logged_in.moon +++ b/views/index/logged_in.moon @@ -6,17 +6,19 @@ class extends Widget script src: "/static/index.js" p "API Keys:" ul -> - for key in *@keys - li key.uuid + if @keys + for key in *@keys + li key.uuid -- li -> -- a onclick: "new_key()" p "Tasks:" ul -> - for task in *@tasks - li -> - input type: "checkbox", id: "task-#{task.id}", onchange: "check(#{task.id})", checked: task.done - text " #{task.text}" + if @tasks + for task in *@tasks + li -> + input type: "checkbox", id: "task-#{task.id}", onchange: "check(#{task.id})", checked: task.done + text " #{task.text}" li -> form { onsubmit: "new()"