changeset 3670:2c0170be6cf0 configuration

usermanagement: return an empty list of user countries in case the user is logged out and the object is not present
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 17 Jun 2019 12:29:20 +0200
parents 6bb8def12f20
children 2c92e9cd0889
files client/src/store/usermanagement.js
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/store/usermanagement.js	Wed Jun 12 16:12:11 2019 +0200
+++ b/client/src/store/usermanagement.js	Mon Jun 17 12:29:20 2019 +0200
@@ -42,6 +42,7 @@
   state: init(),
   getters: {
     userCountries: state => {
+      if (!state.users) return [];
       return state.users.reduce((o, n) => {
         o[n.user] = n.role !== "sys_admin" ? n.country : "global";
         return o;