Vuex mutations sets state stack overflow

when using vuex, use

in vue pages
this.$store.commit("mapSet",map);

to call mutations to change state, but in mutations

 mapSet:(state,map)=>{
            console.log(map);
            state.myMap=map;
        }
    

but it is normal to output map objects when the page is called, but stack overflows are reported when assigning values. What is the error? How to solve the problem?

clipboard.png

Mar.21,2021

endless loop. Setting myMap triggers commit again


although I don't know why, I find that when setting state, do not set it to null, for example:
a:null / / it will report an error, stack overflow
a: {} / / this setting will be better
and, in mutations, assign the parameter to the attribute of state. For example:
a.a = parameter
so that the assignment will be correct and will not report an error.
this is how to solve this problem for the time being. The specific principle is not very clear. Please give us your advice

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b41e59-34997.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b41e59-34997.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?