Fix cache bug when changing school class

This commit is contained in:
Ramon Wenger 2022-09-05 16:49:15 +02:00
parent b244c7349d
commit e3f611a5eb
2 changed files with 5 additions and 4 deletions

View File

@ -32,9 +32,10 @@ export default {
store.writeQuery({query: ME_QUERY, data}); store.writeQuery({query: ME_QUERY, data});
innerApollo.mutate({ // todo: still needed for anything? asking chrigu @05.09.22, but commenting it for bugfix
mutation: DELETE_MODULE_NODES // innerApollo.mutate({
}); // mutation: DELETE_MODULE_NODES
// });
}, },
refetchQueries: [{ refetchQueries: [{
query: MY_SCHOOL_CLASS_QUERY query: MY_SCHOOL_CLASS_QUERY

View File

@ -37,7 +37,7 @@
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
// toggle edit mode if leavind the module subtree // toggle edit mode if leaving the module subtree
if(this.module.inEditMode && to.path.indexOf('/module/') === -1) { if(this.module.inEditMode && to.path.indexOf('/module/') === -1) {
setModuleEditMode(this.module.slug, false); setModuleEditMode(this.module.slug, false);
} }