Cosmetics
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 9 May 2020 20:51:19 +0000 (22:51 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 9 May 2020 20:51:19 +0000 (22:51 +0200)
client/src/components/UpsertUser.vue
client/src/components/UserBio.vue
server/routes/users.js

index 24e3c41..e5b8c79 100644 (file)
@@ -4,7 +4,7 @@ div
     type="checkbox"
     @change="trySetEnterTime($event)"
   )
-  div#upsertDiv(
+  #upsertDiv(
     role="dialog"
     data-checkbox="modalUser"
   )
index 4631e83..89c146a 100644 (file)
@@ -4,13 +4,13 @@ div(:id="'player_' + uid")
     :id="'modalBio_' + uid"
     type="checkbox"
   )
-  div.bio-div(
+  .bio-div(
     role="dialog"
     :data-checkbox="'modalBio_' + uid"
   )
     .card
       div(v-if="st.user.id == uid")
-        div.buttons
+        .buttons
           button(@click="toggleEdit()")
             | {{ st.tr[modeEdit ? "Cancel" : "Edit"] }}
           button(
index 7d886b2..dfe2fa2 100644 (file)
@@ -83,7 +83,7 @@ router.get("/whoami", access.ajax, (req,res) => {
 router.get("/users", access.ajax, (req,res) => {
   const ids = req.query["ids"];
   // NOTE: slightly too permissive RegExp
-  if (ids.match(/^([0-9]+,?)+$/)) {
+  if (!!ids && !!ids.match(/^([0-9]+,?)+$/)) {
     UserModel.getByIds(ids, (err, users) => {
       res.json({ users: users });
     });