Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

256
Vistas
unable to access vuex store property in safari. code is working fine in Chrome

I am desperately needing some help with vuejs vuex store. it is working absolutely fine in chrome but in safari store property is not being picked up. basically I have stored a user object in Vuex store as follows: - here is the image of my code

here is the image of within component where I am trying to access the property from store

here is the image of when axios call is made and within response I am triggering the mutation

state:{
    user:{},
    student:{}
    },
    
mutations:{
    setUser(state,payload) {
        state.user = payload;
        },
        
    setLoggedIn (state,payload) {
        state.isLoggedIn = payload;
        },
    
    setStudent(state,payload){
        state.student = payload;        
        }
        
        },

 getters:{
 
    isStudent: state => {
 
    if(state.user.user_type === 'student') {
     return true;
   }
   }
 
 }

I am calling the mutation from inside the login component whilst executing axios call request and setting the user and student through appropriate commit from the component. However, when I am trying to access the user property inside the component, it works fine for Chrome but it is not working for Safari. Here is how I am calling for state user property inside the component: -

computed:{
       
     computedStatus(){

                return this.$store.state.isLoggedIn;

            },
        computedUserType(){
                return this.$store.state.user.user_type;
        },
        isUserStudent(){
            return this.$store.getters.isStudent;
        }

    }

The property isUserStudent is used inside the component and is a dependency to further functionalities. This property is assessed correctly and as expected inside Chrome/Firefox, but in safari it is not being assessed. I am really puzzled what's going on here and hope that someone can support please

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda