diff client/src/store/usermanagement.js @ 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 081182dfcc35
children 2261462ddcdc
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;